improve sync mechanism