implementation of command line interface