this var is defined in `sync`, please find a way to reuse it or declare as global.