added command line processing