added localstorage test, saving before updating