int adjustPeaks(List<double> data, int oldInd) { maxVal = data.reduce(max); ind = data.indexOf(maxVal); return oldInd + ind; }