checkpoint implementation