fixed the zebra stripes algorithm, now with moar math(tm)