adding code for running naive bayes