public void addPeers(Object peers) throws UnknownHostException {
        if (peers instanceof List) {

            List peersList = (List) peers;
            for (Object elem : peersList) {
                Map peerMap = (Map) elem;
                ByteBuffer addressByteBuffer = (ByteBuffer) peerMap.get(ByteBuffer.wrap("ip".getBytes()));
                InetAddress address = InetAddress.getByName(new String(addressByteBuffer.array()));
                int port = ((Long) peerMap.get(ByteBuffer.wrap("port".getBytes()))).intValue();
                ByteBuffer peerIdByteByteBuffer = (ByteBuffer) peerMap.get(ByteBuffer.wrap("peer id".getBytes()));
		if (peerIdByteByteBuffer == null)
		    peerIdByteByteBuffer = (ByteBuffer) peerMap.get(ByteBuffer.wrap("peer_id".getBytes()));
		    
                byte[] peerIdByteString = peerIdByteByteBuffer.array();

                if (Torrent.verbose) {
                    addEvent(new Event(this, "Offering new peer: " + address, Level.FINE));
                }
                peersManager.offer(peerIdByteString, address, port);
            }
        } else if (peers instanceof ByteBuffer) {
            byte[] peersString = ((ByteBuffer) peers).array();
            for (int i = 0; i < peersString.length / 6; i++) {
                byte[] peerByteAddress = new byte[4];
                System.arraycopy(peersString, i * 6, peerByteAddress, 0, 4);
                InetAddress address = InetAddress.getByAddress(peerByteAddress);
                int port = ( (peersString[i * 6 + 4] & 0xFF) << 8) | (peersString[i * 6 + 5] & 0xFF);

                if (Torrent.verbose) {
                    addEvent(new Event(this, "Offering new peer: " + address, Level.FINE));
                }
                peersManager.offer(null, address, port);
            }

        } else {
        	log.error("WTF!!!");
        }
    }