Add missing import
Modify pattern-matcher
Add tests