batch processing - tom's changes