fixed reduce method of TabularCPD