finished batch mode and some testing