added FactoryMethodPattern and TemplateMethodPattern.