refactoring event service