1. save fold status
2. upgrade function