command line function