Added probabilities to formula generating.