refactor arg parse code to cmds