add functions to manipulate global lua vars