use safe_delete