Allow different types of batch
Merge branch 'counter_batch'