refactoring all events