building prob_table