refactoring vars