added event processing