wrote mdm bayes rgp3