lock implementation completed