removed old getEnv method