Beginning of the Chord implementation