adds trigger, on and off events