creating triggerfactory