Add more funcitonality to pagination