move pagination to a module and use it in all necessary routes