improve concurrency and better documentation for synchronization