Adapted to the changes in fun