Chord in Erlang