private void parseCSV(CSVReader reader, int type, int level) {
		String[] nextLine;
		String value;
		int i = 0, j;
		
		try {
			while ((nextLine = reader.readNext()) != null) {
				for (j = 0; j < nextLine.length; j++) {
					value = nextLine[j].replaceAll(" ", "");					
					switch(type) {
					case LAYER:
						if (value.equals("")) {
							grid[i][j].layers[level] = null;
							grid[i][j].layerExists[level] = false;
						} else {
							if(!value.equals(""))
								grid[i][j].layers[level] =
									Integer.parseInt(value);
							else
								grid[i][j].layers[level] =
									null;
						}			
						break;
					case OIL: grid[i][j].oil[level] = Integer.parseInt(value);
					break;
					case GAS: grid[i][j].gas[level] = Integer.parseInt(value);
					break;
					case ROCK: grid[i][j].rocktype[level] = new LithologicType(Integer.parseInt(value));
					break;
					default: System.out.println("WE HAZ TEH ERROZ?");
					}
				}
				i++;
			}
		} catch (IOException ioe) {
			ioe.printStackTrace();
		}
	}