naive bayes implementation check