added bayesian networks code