added comments and fixed columns
fixed merge conflicts
LOOP INVARIANTS
LOOP INVARIANTS