add function of search