code changes for autosync