change global variable with class variable