update for localstorage