changed usage of search method