Implemented addEvent()