modify bayes.py