```\nfunction _deleteLienPosition(uint256 collateralId, uint256 position) public {\n  uint256[] storage stack = liens[collateralId];\n  require(position < stack.length, "index out of bounds");\n\n  emit RemoveLien(\n    stack[position],\n    lienData[stack[position]].collateralId,\n    lienData[stack[position]].position\n  );\n  for (uint256 i = position; i < stack.length - 1; i++) {\n    stack[i] = stack[i + 1];\n  }\n  stack.pop();\n}\n```\n