adds on off and trigger events