implemented getEvents()