rewrite to ensure-package-install