Modified Chord.cpp