added pagination to events