fix base case for has next page
dist