added ability to run with command line arguments without gui