comment and invariant check