adding function to process mutual information