sync refactored