Extarct pattern generation into individual classes