Steps help to turn misbehavior into teaching opportunities