refactor checkLegalChord and checkLegalIncomplete methods