Added concurrency and locks