add NMI document and make NMI accept two vectors, too.