private boolean waitForAck() throws IOException {
	byte buffer[] = new byte[PAYLOAD_LEN];
	DatagramPacket responseDatagram = new DatagramPacket(buffer, PAYLOAD_LEN);

	//this.sendingSocket.receive(responseDatagram);
	
	try{
	    
	    this.ackSocket.receive(responseDatagram);
	}catch (SocketTimeoutException ste){
	    if(debug){
		System.out.println("TIMEOUT!");
	    }
	    return false;//timeout thrown
	}
	

	StringBuffer msgBuffer = new StringBuffer(responseDatagram.getLength());
	System.out.println("\t\t\tWaiting...");
	for (int i = 0; i < responseDatagram.getLength(); i++) {
	    msgBuffer.append((char) responseDatagram.getData()[i]);
	}
	
	
	boolean isOkAck = false;
	try{
	    System.out.println("\t\t\tTRYING");
	    
	    ReliableTransportMessage response = ReliableTransportMessage
		.reconstitute(buffer);

	    
	    boolean isAck = (response.getOpCode() == ReliableTransportMessage.ACK);

	      
	    if(isAck){
		System.out.println("\t\t\tISACK = YES");
	    }else{
		System.out.println("\t\t\tISACK = NO!");
	    }
	    




	    boolean sumOk = validateSum(response);
	    	  	    
	    if(sumOk){
		System.out.println("\t\t\tSUMOK = YES");
	    }else{
		System.out.println("\t\t\tSUMOK = NO!");
	    }
	    
	    
	    boolean seqOk = runningSequenceNo==response.getSequenceNo();
	    
	    


	    if(seqOk){
		System.out.println("\t\t\tSEQOK = YES");
	    }else{
		System.out.println("\t\t\tSEQOK = NO!");
	    }
	    

	    isOkAck = isAck && sumOk;
	    
	    
	    System.out.println("\t\tACK RECEIVED: " + response.getSequenceNo());
	    
	}catch (NullPointerException npe){
	    System.out.println("\t\t\tNOPE");
	    return false;
	}
	//System.out.println(response.getOpCode());
	
	return isOkAck;
    }