make pagination more effcient