reworking triggerfactory logic