update saveState