Added code for computing probabilities.