change static variable to class member