Better solution for back to search results function