fulfill the search function

Basic function is completed