replace ! defined... with ensure_packages. include stdlib.