make batch_size a method parameter