refactoring Application array to object