working on tree.c