         guard indexOfSelectedNode != nil else { return nil }
 
         let node = nodes[indexOfSelectedNode!]
-        let arrInk = getInk(for: node)
-        let frame = arrInk.reduce(arrInk.first!.frame) { $0.1.frame.union($0.0) }
+        let (arrInk, frame) = getInk(for: node.indexes)
         
         for index in node.indexes.sorted(by: >) {
             inkCache.remove(at: index)

        var nodeFrames = [CGRect]()
        
        for (nodeIndex, node) in nodes.enumerated() {
            let ink = getInk(for: node)
            let frame = padded(rect: ink.reduce(ink.first!.frame) { $0.1.frame.union($0.0) })
            
            nodeInks.append(ink)
            nodeFrames.append(frame)

            guard frame.contains(point) else { continue }
            

    
    // MARK: - Ink
    
    private func getInk(for indexes: [Int]) -> (arrInk: [InkType], frame: CGRect)  {
        var arrInk = [InkType]()
        for i in indexes { arrInk.append(ink[i]) }
        
        return (arrInk, arrInk.reduce(arrInk.first!.frame) { $0.1.frame.union($0.0) })
    }
    
    private func padded(rect: CGRect) -> CGRect {
