replace inRange function with rangeContainsPos from FCS