added isLeaf