refactoring syncing