solve xrange