could refactor this whole block out

def paginate(elements, per_page, page)