zigzag conversion done