dynamically size the zigzag
add box separator and extract pattern generation