refactor application helper