working pagination for category items