add global var initialization code