sync function some changes to restore it