writing and merging batches