Does this need to be a global? Could we simply read the environment variable each time this function is invoked?