             
             // this is the sequence's destination. Remember to set background mode in info.plist
             status = MIDIDestinationCreateWithBlock(midiClient,
-                                                    "com.rockhoppertech.VirtualDest",
-                                                    &destEndpointRef,
-                                                    readBlock)
+                                                    "Swift3MIDI.VirtualDestination",
+                                                    &virtualDestinationEndpointRef,
+                                                    MIDIPassThru)
+//                                                    readBlock)
             
             if status != noErr {
                 print("error creating virtual destination: \(status)")
                 checkError(status)
             } else {
-                print("midi virtual destination created \(destEndpointRef)")
-            }
-            
+                print("midi virtual destination created \(virtualDestinationEndpointRef)")
+            }
+            
+            //use MIDIReceived to transmit MIDI messages from your virtual source to any clients connected to the virtual source
+            status = MIDISourceCreate(midiClient,
+                                      "Swift3MIDI.VirtualSource",
+                                      &virtualSourceEndpointRef
+            )
+            if status != noErr {
+                print("error creating virtual source: \(status)")
+            } else {
+                print("midi virtual source created \(virtualSourceEndpointRef)")
+            }
+
             
             connectSourcesToInputPort()
             
-            enableNetwork()
-            
             initGraph()
-            
         }
         
     }

            print("parent \(m.parent)")
            print("parentType \(m.parentType)")
            
            break
            
        // An object's property was changed. Structure is MIDIObjectPropertyChangeNotification.

            print("destinationEndpoint \(session.destinationEndpoint())")
            print("networkName \(session.networkName)")
            print("localName \(session.localName)")

            if let name = getDeviceName(session.sourceEndpoint()) {
                print("source name \(name)")
            }

            if let name = getDeviceName(session.destinationEndpoint()) {
                print("destination name \(name)")
            }
        }
    }
    
