public void getNewClient(){
		if(this.numClients < maxclients){
			try {
				Socket newConnection = serverSocket.accept();
				
				ObjectOutputStream oos = new ObjectOutputStream(newConnection.getOutputStream());
				ObjectInputStream ois = new ObjectInputStream(newConnection.getInputStream());
				
				if(!ois.readBoolean()){//if it is a new person connecting
					
					//reading hashed finger, rehash and store.
					MessageDigest m = MessageDigest.getInstance("MD5");
					
					int length = ois.readInt();
					byte[] finger = new byte[length];
					ois.read(finger,0,length);
					
					WrappedClient<G> w = new WrappedClient<G>(newConnection, new String(m.digest(finger)) );
					
					//tell user their client number
					oos.writeInt( w.identifier );//send the client their value.
					oos.flush();
					
					synchronized(this.clients){
						this.clients.add( w );
					}
					System.out.println("accepting new connection, "+w.identifier);
					numClients++;
					new ClientReader<G>(this, w).start();	 
					this.serverGameplay.onConnect(w);
				}
				else{ //otherwise if reconnect
					WrappedClient<G> target = this.getClientByID(ois.readInt());
					
					int length = ois.readInt();
					byte[] finger = new byte[length];
					ois.read(finger,0,length);
					
					MessageDigest m = MessageDigest.getInstance("MD5");
					
					if( target.disconnected && new String(m.digest(finger)).equals(target.fingerprint)){//if the hashes match the fingerprint hash
						target.updateSocket(newConnection);
						new ClientReader<G>(this, target).start();	 
						this.serverGameplay.onReconnect(target);
						System.out.println("accepting reconnection of "+target);
					}
					else if (target.disconnected){
						newConnection.close();
						System.out.println("rejecting reconnection of "+target+", invalid confirmation");
						System.out.println(new String(m.digest(finger))+" "+new String(target.fingerprint));
					} else{
						newConnection.close();
						System.out.println("rejecting reconnection of "+target+", someone is already connected under that client");
					}
					
				}
				
				
			} catch (SocketException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} catch (NoSuchAlgorithmException e) {
				e.printStackTrace();
			}
		}
	}