Can you (briefly) explain the invariant here?