start rewriting the CLI, patch 3