         node           = Node(key: key, data: data)
         node.down      = currentTopNode
         newHead.next   = node
-        newHead.down   = self.head
-        self.head      = newHead
+        newHead.down   = head
+        head           = newHead
         currentTopNode = node
         
       } else {        

    
  }

  internal func search(key: Key) -> Payload? {
    guard let node = self.findNode(key: key) else {
      return nil
    }

    return node.next!.data    
  }    
 
}



// MARK: - Inserting

extension SkipList {
  private func bootstrapBaseLayer(key: Key, data: Payload) -> Void {    
    self.head          = Node(asHead: true)    
    var node           = Node(key: key, data: data)

    self.head!.next    = node
    
    var currentTopNode = node


  }  
}


// MARK: - Get associated payload from a node with a given key.

extension SkipList {
  
  public func get(key:Key) -> Payload?{
    return search(key: key)
  }
}
