Implemented batch mode