refactoring view