Emily & Molly - refactoring pagination to dynamically create the number of pages