done Prob calculating function