adding search method and tests