updated pagination to use  in its path