added some functionality for global variabels