Finished Naive Bayas method