refactor cli app: