add how to calculate NMI and others.