updating tree

+ tree.c
+ tree.h