     }
     
     // MARK: internal notification management
+    
+    private func cancelTimer() {
+        if notificationTimer != nil {
+            notificationTimer!.invalidate()
+            notificationTimer = nil
+        }
+    }
+    
     private func rescheduleNextNotification() {
         
         guard pendingNotification == nil else {

            return
        }
        
        if notificationTimer != nil {
            notificationTimer!.invalidate()
            notificationTimer = nil
        }
        
        notifications.sortInPlace { (n1, n2) -> Bool in
            // n1 is before n2?

    
    // cancel method
    public func cancelAllNotifications() {
        cancelTimer()
        notifications.removeAll()
    }
    
