Moved addEvent method