public static ArrayList<TestAttempt> getAttempts(Document doc){
		File folder = new File(DocIO.SAVE_PATH+doc.getName());
		File[] listOfFiles = folder.listFiles();
		ArrayList<String> files = new ArrayList<String>();
		for (int i = 0; i < listOfFiles.length; i++) {
			if (listOfFiles[i].isFile()) {
				files.add(listOfFiles[i].getName());
			} 
		}
		if (files.size()==0){
			System.out.println("There are no documents to load");
			return null;
		}
		ArrayList<TestAttempt> attempts = new ArrayList<TestAttempt>();
		for (int i=0;i<files.size(); i++){
			try(
					InputStream file = new FileInputStream(DocIO.SAVE_PATH+doc.getName()+files.get(i));
					InputStream buffer = new BufferedInputStream(file);
					ObjectInput input = new ObjectInputStream (buffer);
					){
				attempts.add((TestAttempt)input.readObject());
			}
			catch(ClassNotFoundException ex){
				ex.printStackTrace();
			}
			catch(IOException ex){
				ex.printStackTrace();
			}
		}
		return attempts;
	}