patched in env() helper function.