pagination works now without a duplicate first page