fix for renamed xrange in python3