updated restore and save state to include all events