better tree view & smaller query