import function now requires environment