Optional: i would define numerical constants  `MAJORITY=0, CONFIDENCE = 1, PROBABILITY = 2` (and use them) for readability