move global variable into local variable for wpp