change all local variable to global variable.