added isExpanded test