properly save things to localstorage (search)