         displayParent.children = count
         self.reload(indexPaths: [indexPath], tableView: tableView) {
           if let completion = completion {
-            // handle complete
+            // handle complete and reorder
             completion(children: count)
           } else {
             // save

      
      // collapse
      self.collapse(indexPath: indexPath, tableView: tableView) { children in
        // FIXME: does not always work (if cell is collapsed and whatnot
        // because background thread, snapshot gets taken before collapse
        if let cell = tableView.cellForRowAtIndexPath(indexPath) {
          cell.hidden = true
        }
      }
    }
  }

          if child.indent <= noteParent.note.indent {
            break
          }
          // remove
          section.append(self.notes.removeAtIndex(next))
        }
        
        // insert
        func insert(section section: [Note], index: Int) {
          // insert and save
          self.notes.insertContentsOf(section, at: index)
          Notebook.set(data: self)
        }
        
        // insert section at start
        if toIndexPath.row == 0 {
          insert(section: section, index: 0)
          return
        }
        
        // insert section at end
        let displayPrev = self.display[toIndexPath.row-1]
        var notePrev = self.getNoteParent(displayParent: displayPrev)
        if notePrev.index+1 >= self.notes.count {
          insert(section: section, index: notePrev.index+1)
          return
        }
        
        // insert section at mid
        let next = notePrev.index+1
        if next > notePrev.note.indent {
          // find last child
          for i in next..<self.notes.count {
            let child = self.notes[i]
            if child.indent <= notePrev.note.indent {
              break
            }
            notePrev.index = i
          }
        }

        insert(section: section, index: notePrev.index+1)
      }
    }
  }
