refactoring event model