Some kind of marker is needed to check whether node has been collapsed or not. So introduce (HashNode).Collapsed