implement the search function for common use.