finish all search function