I think I finally nailed this stupid pagination