imported compatibility xrange from six