still simplify the binary tree depth code