added searchbar event handling