checkpointing problem 2