updated isRange to isBetween