add variable in cfg, refactoring, change cmd to cmd2
Add TODO