sync service, refactoring