added function of reading arguments from command line.