separate the command line parser from main program