xrange is correct in this case