move variable context to class