Adding pagination to page