* uses range instead of xrange to make it python3 (and ST3) compatible