slightly more functional bayesian stuff