improve the logic of search friend