public synchronized int addNewQuiz( QuizServer quizAccess){
		System.out.println("Lets add a new quiz");
		int newQuizId=0;
		String quizTitle="";
		Set<Question> questionList=null;
		List<Integer>quizIdList= new ArrayList<Integer>();
		
		try{
			//Set<Quiz> quizList= quizAccess.getQuizList();
			List<Result> resultList = quizAccess.getResultList();
			
			Iterator<Result> resultListIterator = resultList.iterator();
			//Iterator<Quiz> quizIterator = quizList.iterator();
			
			while(resultListIterator.hasNext()){
				Result nextResult = resultListIterator.next();
				int quizId =nextResult.getQuizId();
				quizIdList.add(quizId);
			}
			
			Collections.sort(quizIdList);
			
			int topQuizId = quizIdList.get(quizIdList.size()-1);
			newQuizId=topQuizId+1;
			System.out.println("enter quiz title");
			quizTitle= bufferedReader.readLine();	
			System.out.println("How many questions are you going to have in this test?");
			int totalQuestions = Integer.parseInt(bufferedReader.readLine());	
			
			questionList= addNewQuestion(newQuizId,totalQuestions);
			quizAccess.fileWriter(new QuizImpl(questionList,quizTitle,newQuizId));
			quizAccess.addNewQuiz(new QuizImpl(questionList,quizTitle,newQuizId));
			}
			catch(RemoteException remoteException){
				remoteException.printStackTrace();
			}catch(IOException ex){
				ex.printStackTrace();
			}
			System.out.print("The new quiz Id : ");
			return newQuizId;
	}