refactoring in Views