changed $range so pagination works as expected