refinements to naive bayes