Measure functions and isLeaf