separate Checkpoint api and impl from examples