promote some variables to class member