add new search functionality
fix bugs with search