How the batch processing works