public int send(short dest, byte[] data, int len) {

		//can't have too many unacked things to send
		if (toSend.size() > 3)//if there is 4 unacked
		{
			stat.changeStat(Status.INSUFFICIENT_BUFFER_SPACE);
			if(debugLevel > 0) output.println("Too many packets.  Not sending");
			return 0;
		}
		
		if(len < 0)
		{
			stat.changeStat(Status.BAD_BUF_SIZE);
			if(debugLevel > 0) output.println("Illegal buffer size");
			return 0;
		}
			
		if(debugLevel > 0) output.println("LinkLayer: Sending " + len + " bytes to " + dest + " at " + clock.getLocalTime());

		int dataLimit = RF.aMPDUMaximumLength - 10;
		short seq = 0; //placeholder

		//can't have too many unacked things to send
		//if 
		
		if (len <= dataLimit) { 
			// build the frame with data, sequence # = 0, retry bit = 0
			byte[] outPack = helper.createMessage("Data", false, ourMAC, dest,data, len, seq); // create packet
			toSend.add(outPack);// add to the outgoing queue
		} 
		else // build multiple packets.  case where send too large items
		{
			int srcPos = 0;
			int lenEx = len;
			while (lenEx > dataLimit) {
				byte[] packetS = new byte[dataLimit];
				System.arraycopy(data, srcPos, packetS, 0, dataLimit);
				byte[] outPack = helper.createMessage("Data", false, ourMAC,
						dest, packetS, dataLimit, seq); // create packet
				toSend.add(outPack);// add to the outgoing queue
				//seq++;
				srcPos = srcPos + dataLimit;
				lenEx = lenEx - dataLimit;
			}
			byte[] packetL = new byte[lenEx];
			System.arraycopy(data, srcPos, packetL, 0, lenEx);
			byte[] outPack = helper.createMessage("Data", false, ourMAC, dest,
					packetL, lenEx, seq); // create packet
			toSend.add(outPack);// add to the outgoing queue
		}
		if(debugLevel > 0) output.println("Finished the sending routine. Packet in buffer: " + toSend.size() + " at " +clock.getLocalTime() );
		return len; 
	}