Adding pagination controls