private static double getMaxValue(double[] max) {
        double temp = 0.0;
        for (int i = 0; i < max.length; i++) {
            if (temp < max[i]) {
                temp = max[i];
            }
        }
        return temp;
    }