refactor application search to reuse search options