changed the way environment variables are handled