refactoring some vars