making pagination work again