Added global variable functionality