James C - added a useful invariant just as an example