fix and document related
factor out normalize mutual info function