         }
     }
 
-    //print osc data from notification
-    func addOSCMessage(notification: Notification) {
-        let message = notification.object as! OSCMessage
-        
+    //add osc data from notification
+    func didReceive(_ message: OSCMessage) {
         if message.address.matches(path: self.addressValue) {
             let tableData = TableData(Date(), message)
             self.tableData.append(tableData)

            self.address.stringValue = address
        }
        
        //set view to receive notifications from server
        NotificationCenter.default.addObserver(
            self,
            selector: #selector(addOSCMessage),
            name: OSCServer.didReceiveMessage,
            object: nil
        )

        tableView.dataSource = self
        
    }

            
        }
    }
}

