added some functioanlity for global variables