updated application to accept parameters from the command line.