Refactor searchForNum