new partition inference code