added consistenca check in chord.php, updated corresponding unit tests