```\nfunction \_updateWithdrawalQueue() internal {\n  uint256 \_availableLiquidity = totalLiquidity.sub(totalCoverTokens);\n  uint256 \_countToRemoveFromQueue;\n\n  for (uint256 i = 0; i < withdrawalQueue.length; i++) {     \n    uint256 \_tokensToWithdraw = withdrawalsInfo[withdrawalQueue[i]].amount;\n    uint256 \_amountInDai = \_tokensToWithdraw.mul(getDAIToDAIxRatio()).div(PERCENTAGE\_100);\n\n    if (balanceOf(withdrawalQueue[i]) < \_tokensToWithdraw) {\n      \_countToRemoveFromQueue++;\n      continue;\n    }\n\n    if (\_availableLiquidity >= \_amountInDai) {\n      \_withdrawLiquidity(withdrawalQueue[i], \_tokensToWithdraw);\n      \_availableLiquidity = \_availableLiquidity.sub(\_amountInDai);\n      \_countToRemoveFromQueue++;\n    } else {\n      break;\n    }\n  }\n\n  \_removeFromQueue(\_countToRemoveFromQueue);\n}\n```\n