     }
     
     func storeChanged(_ nsNotification: NSNotification) {
-        // print("Method invoked")
          print("Event name \(nsNotification.userInfo?["EKEventStoreChangedObjectIDsUserInfoKey"])")
+         self.loadEvents()
     }
     
     func getDateFormatter() -> DateFormatter {

extension ViewController: EKEventEditViewDelegate {
    
    func eventEditViewController(_ controller: EKEventEditViewController, didCompleteWith action: EKEventEditViewAction) {
        loadEvents()
        self.dismiss(animated: true, completion: nil)
    }
    

        return UIAlertAction(title: "Yes", style: .default, handler: {(alert: UIAlertAction!) -> Void in
            do {
                try self.eventStore.remove(event, span: .thisEvent, commit: true)
               
            } catch {
                print("Error occurred while deleting event " + event.title)
            }
