improved UPnP implementation