updated script to accept and parse command line arguments