use batch mode