public void sanityCheck() {
		if (DEBUG) {
			
			// check heights[] is correct
			for (int i = 0; i < width; i++) {
				int chHeight = checkColumnHeight(i);
				if (chHeight != heights[i]) {
					throw new RuntimeException("Heights[] incorrect");
				}
			}
			
			// check widths is correct
			for (int j = 0; j < height; j++) {
				int chWidth = checkRowWidth(j);
				if (chWidth != widths[j]) {
					throw new RuntimeException("Widths[] incorrect");
				}
			}
			
			// check max height is correct
			int chMaxHeight = checkMaxHeight();
			if (chMaxHeight != maxHeight) {
				throw new RuntimeException("MaxHeight incorrect");
			}
			
			
		}
	}