fixed global variable and functional call use set