adds pagination to books