new code logic, CLI interface