#81 better tree structure