added getEventByType() method