now the program accepts command line arguments