some event refactoring