changed for global variables