I copied this from FirstFalureTrigger, but I don't think it is correct.  It was probably copied from some other trigger.