work with event types + refactoring