changes in to_tabular_cpd method