refactor cmd.Cmd implementation - simpler