added command line arguments parsing