Added PatternGenerator

Added PatternGenerator