removed need for ScopedEnvironment