switch to environment variable struct