implemented search and getEvents() methods