before refactoring checkpoint