Finished get_prob_model function