Checkpoint 2 code