changed check for cid