use xrange which is faster