add prob test and fix bug in prob structure.