check in cmd.cpp