addPatterns: method implemented.