put search in localstorage first