       let noteParent = self.getNoteParent(displayParent: displayParent)
       
       // note child
-      var noteChild = (note: noteParent.note, index: noteParent.index)
+      var noteChildIndex = self.notes.count
       for i in noteParent.index+1..<self.notes.count {
-        noteChild = (note: self.notes[i], index: i)
-        if noteChild.note.indent <= noteParent.note.indent {
+        let noteChild = self.notes[i]
+        if noteChild.indent < noteParent.note.indent {
+          noteChildIndex = i
           break
         }
       }

      let noteParent = self.getNoteParent(displayParent: displayParent)
      
      // note child
      var noteChild = (note: noteParent.note, index: noteParent.index)
      for i in noteParent.index+1..<self.notes.count {
        noteChild = (note: self.notes[i], index: i)
        if noteChild.note.indent <= noteParent.note.indent {
          break
        }
      }

            self.uncollapse(indexPath: displayIndexPath, tableView: tableView) {
              // save
              Notebook.set(data: self)
              print(self)
            }
          }
        }
