has an error in paginate , want help from github