edit autosave: while loop