renamed Pagination and working on fixing endless loop