added command line control