add new parts to bayes.py