added jsonable to Bayes