add docs and fix off-by-one
Merge pull request #187 from twitter/feature/off_by_one_again

Fix off-by-one, add docs