refactoring application helper