fix merging issues on test_threshold, fix probability issue in all the analyse functions