removed unused code
added cli options