added global to refenerece the global variable