added anchor containment, ensure_packages