added concurrency checking