rangeTest function

Range test