refactor for commander.go