Added getEnvironment method