updated pagination for categories