Algorithm that computes probabilities has been coded.