refactoring
refactoring
massive changes in sync logic