metodo salva localstorage