changed environment variables to global variables