these globals should be static