added loop for new search