refactor view.