clearer Naive Bayes function