working on pagination for index