Added batch mode