FIX: changed xrange to range so Python 3 works.