Added classes, Calculates probabilities