added tree.h as public header