add explicit comments for ranges, hoping to avoid off-by-one

Change-Id: Ibce02d1f3f499cd6b516768424d8ce52542f6ee2
Merge "add explicit comments for ranges, hoping to avoid off-by-one"