Added batch processing.