moved global var to 1 line, inline using $GLOBALS