test trigger logic