only save state upon editing.