Adding the lock