fixing command line functionality