Added more tree functions