small optimisation for tree-structured data