public void run(){
		try {
			while (true) {
				CTSTransferMode mode = (CTSTransferMode) in.readObject();
				if(mode.equals(CTSTransferMode.ModeUpdate))
					client.setMode((ClientMode) in.readObject());
				else if (mode.equals(CTSTransferMode.DataSet))
					main.submitNumbers((int[]) in.readObject());
				else if (mode.equals(CTSTransferMode.Init))
					client.ID = ((Integer) in.readObject()).intValue();
			}
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e){
			//client.closeClient(); make disconnected state. If something tries to re-init with same ID then overwrite?
		}
	}