took out global variable assignments