added mutual info calculation.