adding correct code correctnessAndTheLoopInvariant