updated cmd logic
updated cli logic