add #recursive_search and refactor #search