Refactoring, added Checkpoint