refactory bayesian processor into avgRating processor.