added nested checkpointing
comments