all code for naive bayes in and working