inserted example of thread sync