Implemented command detection