persist changes to local storage