storing the previous search result