def extractLeafNames(nt):                                   
    """ given a newickTree BinaryTree object, returns a list
    of leaf names as given by their .ID values              
    """                                                     
    names = []
    if nt.right is not None:
        names += extractLeafNames(nt.right)
    if nt.left is not None:
        names += extractLeafNames(nt.left)
    if not nt.internal:
        names.append(nt.iD)
    return names