almost final version, checkpoint