added previous/next pagination to resource