added cmd detection