maybe i'm getting closer?

first fail was counting all children instead of the height of a node's subtrees.

second fail is not making calcheight work...sigh