public static Registry440 getRegistry(String host, int port) throws RemoteException440{
		try{
			Socket soc = new Socket(host, port);
			ObjectOutputStream out = new ObjectOutputStream(soc.getOutputStream());
			ObjectInputStream in = new ObjectInputStream(soc.getInputStream());
			HandshakeMessage handshkMsg = new HandshakeMessage();
			out.writeObject(handshkMsg);
			handshkMsg = (HandshakeMessage)in.readObject();
			if (handshkMsg.getType() == MessageType.REPLY &&
					handshkMsg.getOp() == MessageOp.HANDSHAKE) {
				return new Registry440_Stub(host, port);
			} else {
				return null;
			}
		}  catch (SocketException e) {
			throw new RegistryNotFoundException440("Unknown registry");
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			return null;
		}
	    
    }