eliminated global variables