for small iterations, I think range is faster, but since most of the file use xrange, I'll switch to it.