working on hasChildren()