avoid global var