small refactoring for variable access