improve sync-process and code structure.