set up an event factory