add a test of isBetween, and fix a (minor) bug it found.