added command line arguments parsing code