Built out the search function