add support for persistent_id and persisted