internal variable refactoring