[Change] refactored cli code