added abstraction of events