code  add function , delete funtion for CMND