Refactored onevent -> triggers