change to use ensure_resource to reduce conflicts.