starting the refactoring challenge - extracted syncing