refactored test cases out of Bayes file