zigzag-conversion