added new function to retrieve a limted number of events