adds the feature to save the collapsable state