private static void updateSizes(int index, int cur, int[] curArray, int min, int[] minArray, int max, int[] maxArray) {
		if (min > minArray[index]) {
			minArray[index] = min;
		}
		if (max < maxArray[index]) {
			maxArray[index] = max;
		}
		if (cur > curArray[index]) {
			curArray[index] = cur;
		}
		if (curArray[index] < minArray[index]) {
			curArray[index] = minArray[index];
		}
		if (curArray[index] > maxArray[index]) {
			maxArray[index] = curArray[index];
		}
	}