investigate k-neighbor for creating the tree