don't call getenv in loop