larger but non-working version with tree structure