add the function to get max value index in the module, CalCorrelation.hs