Fixed where there is no xrange in python3 anymore. Using range for now