OK. Added comment to explain the meaning of `flag`.