add automatic lock release mechanism