add paginate method