save the expanded state