updated _plan_batch