change globals to be an array of keys