Completed makeTrigger function