added command line argument parsing