implemented database concurrency checking