Implemented and tested isCmd