primary and secondary trigger factories and refactor test to use them