fixed xrange issue for python 3