added estimate_probs function