add separate putLock and takeLocks + test