loop bug tree structure