completed search bar, with tests