refactoring Application