resolving pagination issues