Make syntax style same as other examples

Simplify trigger logic