more event refactoring