add search method and test