update global variable in scope, clears headers