changed pagination to be number based