Chord edit js almost working