adds pagination to locations