reimplemented setEnvironment method;