pattern_generation