realize calculating probabilities