Stressful Events as Teaching Signals for the Brain