public static ArrayList<ArrayList<String>> getCSVContentsAsMatrix(String path)
	{
		//stores the data from the file
		ArrayList<ArrayList<String>> contents = new ArrayList<ArrayList<String>>();

		// Read the file and display it line by line.
		String line = "";

		// Read the file and display it line by line. 
		BufferedReader in = null;

		try
		{
			//open stream to file
			in = new BufferedReader(new FileReader(path));

			try
			{
				while ((line = in.readLine()) != null)
				{
					//split the line on commas
					String[] cells = line.split(",");

					// An array list will represent a row of data from a CSV file
					ArrayList<String> row = new ArrayList<String>();

					//For each comma separated String we retrieve from the file
					for(String c : cells )
					{
						//add it to the row array list
						row.add(c.replace("\"", ""));
					}

					//add the row to the over all contents array list
					contents.add(row);
				}
			}
			catch(IOException e){return null;}
			finally{in.close();}
		}
		catch(FileNotFoundException fnf){ System.out.println("File not found: "+path); }
		catch (IOException e) { return null; }

		return contents;
	}