Updating Pagination to use the url structure