separate out eventable code into module