refactor sdc to handle command line parameters