cleaned loadInEnvironment from deferred