Batch controller