view refactoring