fixed edge cases for conditional probability and added test files