[sync] small refactoring