add run_batch for #221