variable definition refactor