added command line parsing