added bayesian search