thread synchronization first draft