take out global variables