adding locking (2)