tree is done, need to debug