refactorized application