removed global variable