move rangeFromPoint to RangeUtils