updating before sync