moved isRange test to new file