refactoring event creation and pulling