add helper functions
fixes and set_prob_fun