tree.c done. needs comments