updated pagination to give pageRange and anchorPage