autosave method updated