patterns generation
patterns generation