don't use xrange for Python 3