Added chord matching algorithm