public void writeMatchAllocationsFile(MatchList mList)
	{
		// create file writer object
		FileWriter matchAllocationsWriter = null;

		try
		{
			try
			{
				// instantiate file writer object
				matchAllocationsWriter = new FileWriter(matchAllocationsFile);

				matchAllocationsWriter.write(String.format("%-10s%-14s%-14s%-30s%n", "Week No.",
						"Match Level", "Match Area", "Assigned Referees"));

				for (int i = 0; i < 68; i++)
					matchAllocationsWriter.write("*");

				matchAllocationsWriter.write("\n");

				// array length for use as iterator limit
				int arrayLength = mList.getElementsInArray();
				System.out.println(arrayLength);
				// loop over fitnessProgramObject
				for (int x = 0; x < arrayLength; x++)
				{
					Match matchAtX = mList.getMatchArrayAtX(x);

					// if fitness class at x is not null
					if (matchAtX != null)
					{
						matchAllocationsWriter.write(String.format("%-10s%-14s%-14s%-15s & %-15s%n",
								matchAtX.getMatchWeekNumber(), matchAtX.getMatchLevel(), matchAtX.getMatchArea(),
								matchAtX.getAssignedReferee1(), matchAtX.getAssignedReferee2()));
					}
				}
			}
			finally
			{
				// close file writer
				if (matchAllocationsWriter != null) matchAllocationsWriter.close();
			}
		}
		catch (IOException iox)
		{
			JOptionPane.showMessageDialog(null, "File could not be created", 
					"Error", JOptionPane.ERROR_MESSAGE);
		}
	}