changed the way environment variables are accessed