fix probabilities math