How major, minor and dominant chords get their names