checkpoint, rework context class