lddtree call must be outside the for loop.