Update sync function