add support for trees