update to global var