adding support for locking, concurrency