public void run() {
		try {
          serverSocket = new DatagramSocket(53);               
		 } catch(Exception e) {
	    		System.err.println("5");
	    	} 
		 
             byte[] receiveBuffer = new byte[1024];
         	byte[] t=null;
            while(true)
              { 
                DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);
                 
               	try {
                   serverSocket.receive(receivePacket);
                   t = receivePacket.getData();
               	} catch(Exception e) {
    	    		System.err.println(e.toString());
    	    	} 
              
               	port = receivePacket.getPort(); // get the data we need to reply
               	IP = receivePacket.getAddress();
           
	             boolean dropName = false;  // true if we want to deactivate namecoin   
	             boolean useDNSserv = false;  // 
            
              	if (!namecoin.Check(receivePacket.getData()) || dropName) {
                	client.sendPacket(receivePacket);  // Send the packet trough the client object
                	}
                	else 
                	{           
                		if (useDNSserv) {
                			altDns.sendPacket(receivePacket);  // Send the packet trough the client object
                		} else {
                			dnsAnsw svar = new dnsAnsw(t); // Make the DNS Answer
                			byte[] as = svar.getMin();                			
                		
							// Create the UDP packet and send it back
                			DatagramPacket sendPacket = new DatagramPacket(as, as.length, IP, port);
                		    sendPacket(sendPacket);   
                		}
                	}                  	                           	 				                        	
                } 
            
         //     	serverSocket.close();
         //    	System.out.println("server closed");
       }