add local storage editing logic