just curious: what's the point of this "checkpoint" function? why not just call `function` directly?