```\nfunction _makePayment(uint256 collateralId, uint256 totalCapitalAvailable)\n  internal\n{\n  uint256[] memory openLiens = liens[collateralId];\n  uint256 paymentAmount = totalCapitalAvailable;\n  for (uint256 i = 0; i < openLiens.length; ++i) {\n    uint256 capitalSpent = _payment(\n      collateralId,\n      uint8(i),\n      paymentAmount,\n      address(msg.sender)\n    );\n    paymentAmount -= capitalSpent;\n  }\n}\n```\n