introduced ScopedEnvironment