added paged batching