Added bayesian version