#build_tree
removes bugs
Finishs! Also, line 50 makes the search faster