added some JAGS code for model checking