updating localstorage