refactoring checkpointer