Mechanisms of aversive control of behavior