prepare batches