switch order of importance of environment variables