tonyg #1 It creates a tree of TNode objects to which your key is attached and doesn't so much sort them as adjust the parent/child relationships to put them in the best place.I believe Bmax uses a red/black tree