first version of search functionality implemented