public synchronized String[] validatePlayer(QuizServer quizAccess){
		
		int playerId=0;
		String playerName="";
		String[] playerData={"",""};
		List<Player> playerList=null;
		Iterator<Player> playerIterator=null;
		List<Integer> playerIdList =null;
		try{
			BufferedReader bufferedReader= new BufferedReader(new InputStreamReader(System.in));
			playerList=quizAccess.getPlayerList();
			playerIterator=playerList.iterator();
			playerIdList = new ArrayList<Integer>();
			while(playerIterator.hasNext()){
				Player nextPlayer = playerIterator.next();
				playerIdList.add(nextPlayer.getPlayerId());
			}
			
			System.out.println("*****Log in to the quiz server******");
			System.out.println("");
			System.out.println("Enter Player ID");
			playerId= Integer.parseInt(bufferedReader.readLine());
			
			System.out.println("");

			playerIterator=playerList.iterator();
			
			while(!playerIdList.contains(playerId)){
				System.out.println("incorrect choice- try again");
				playerId= Integer.parseInt(bufferedReader.readLine());
			}
				
			while(playerIterator.hasNext()){
				Player nextPlayer = playerIterator.next();
				if(nextPlayer.getPlayerId()==playerId){
					playerId = nextPlayer.getPlayerId();
					playerName=nextPlayer.getPlayerName();
					playerData[0]=Integer.toString(playerId);
					playerData[1]=playerName;
					System.out.println("*****welcome " + nextPlayer.getPlayerName() + " " + "( " + playerId + " ) *******");
				}
			}
		}catch(IOException ioException){
			ioException.printStackTrace();
			
		}
		
		return playerData;
	}