Added bayes algorithm, started work with testing