A adaptation of the Magic Probability Toolkit