added main program example to read command line parameters