converted to command line app