still simplify the BinTreeDepth code