generalize the inference of X framework and with support of missing data