got pagination working properly