refactor view application