update naive bayes class and close some issues