attempted bayesian stuff