event based pagination working