Demonstration of matching algorithm