refactoring app view