implemented command line arguments parsing