saving the state, part 1