add working synchronization function