added the client side bayes