refactor. checkpoint