refactoring to handle command line parameters