working thorugh code in the Scutari and Denis Bayesian Networks book (CRC Press)