correct global variables
correct global variables