edit probability thresholds
add p2 logic
merge