handle saving the search