improved batch processing api