private static <T> void PrintToFile(List<T> array, String filename, int top)
	{
		int numToPrint = top == -1 ? array.size() : top;
		try
		{
			PrintWriter writer = new PrintWriter(filename);
			for (int i = 0; i < numToPrint; i++)
			{
				writer.println(array.get(i).toString());
			}
			writer.close();
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
		}
	}