big update for global variables