added command line processing code