UPDATED IN XXXXX
OpenBUGS codes: