moved BatchParser class here, # of batches is now consistent with # of threads