working search bar functionality