adding getEvents() method