Lock mechanism implementation