added autosaving state object