convert to run from command line