public Byte put(DataPacket packet) {
		
		byte ackStack = 0x00;
		ackStack |= packet.getSource();
		
		this.lock.lock();
		
		//
		if (this.oneToOne.containsKey(ackStack) == false/* || this.oneToOne.get(ackStack).getValue() == (byte)0*/ || this.oneToOne.get(ackStack).getValue() == (byte) 0) {
			
			System.out.println("Dropped packet, ACK's are not registered");
			this.lock.unlock();
			return null;
		}
		
		// ACK?
		if (packet.isAck()) {
			
			this.ACKReceived.put(ackStack, packet.getSequenceNumber());
			System.out.println("RECEIVED ACK: " + ackStack + ":" + packet.getSequenceNumber());
			this.lock.unlock();
			return null;
			
		} 
		
		if (!this.packets.containsKey(ackStack)) {
			this.packets.put(ackStack, new HashMap<Byte, DataPacket>());
		}
		
		if ((this.ACK.get(ackStack) < packet.getSequenceNumber() && packet.getSequenceNumber() - this.ACK.get(ackStack) >= 127)
		 ||(this.ACK.get(ackStack) > packet.getSequenceNumber() && (256-this.ACK.get(ackStack) + packet.getSequenceNumber() - 1) >= 127)
			) {
			
			System.out.println("Packet dropped, queue too long");
			
		} else {
			
			HashMap<Byte, DataPacket> packets = this.packets.get(ackStack);
			packets.put(packet.getSequenceNumber(), packet);
			System.out.println("Package received with seq="+packet.getSequenceNumber());
			this.packets.put(ackStack, packets);
		}
		
		// get last ACK
		byte lAck = this.ACK.get(ackStack);
		while(packets.get(ackStack).containsKey(this.nextSEQ(lAck))) {
			lAck = this.nextSEQ(lAck);
		} 
		
		this.ACK.put(ackStack, lAck);
		
		this.lock.unlock();
		
		return lAck;
		
	}