Probability calculation improved