New function to add search results