added addEvent class