         guard let validNotesViewController = sender.source as? NotesViewController, let validNote = validNotesViewController.note else { return }
         let newIndexPath = IndexPath(row: 0, section: 0)
         if self.presentedViewController is UINavigationController {
-            self.delayExecutionBySecond(1, for: { [weak self] in
+            self.delayExecutionByMilliseconds(1000, for: { [weak self] in
                 guard let weakSelf = self else { return }
                 weakSelf.save(validNote, at: newIndexPath)
             })
         }
         else {
             guard let selectedIndexPath = self.tableView.indexPathForSelectedRow, self.noteDocuments[selectedIndexPath.row].note.entry != validNote.entry else { return }
-            self.delayExecutionBySecond(1, for: { [weak self] in
+            self.delayExecutionByMilliseconds(1000, for: { [weak self] in
                 guard let weakSelf = self else { return }
                 weakSelf.deleteNote(at: selectedIndexPath)
                 weakSelf.save(validNote, at: newIndexPath)

    }
    
    func refreshNoteListing() {
        self.loadNotes()
        self.tableViewRefreshControl.endRefreshing()
    }
    

        self.tableView.reloadData()
    }
    
    fileprivate func delayExecutionByMilliseconds(_ delay: Int, for anonFunc: @escaping () -> Void) {
        let when = DispatchTime.now() + .milliseconds(delay)
        DispatchQueue.main.asyncAfter(deadline: when, execute: anonFunc)
    }
    
