modified cm_mongo based on the discussion