merged
output update
Bug fix with probability calculations