added isLeaf(), isRoot(), insert(), and traverse()