Uott, J.,
delivered the opinion of the court:
The claimants brought their former action in this court upon a written contract. By reason of the common-law rule prevailing in this court, all parol evidence tending to vary the terms of the agreement was excluded, and the claimants were held to be concluded by the terms of their contract. A judgment, however, was rendered upon the contract, as construed by the court, in favor of the claimants, though for a much less amount than they deemed themselves entitled to recover. This judgment was not appealed from; the claimants accepted payment thereof, and then applied to Congress for relief. A private act was passed, Act 14th August, 1876, (19 Stat. L;, p. 490, chap. 279,) referring the claim to this court, authorizing it to reform the contract, and to that end conferring equity jurisdiction. Under that act the claimants have brought this their second suit, and to their.petition the defendants have demurred. .
The private act under which the suit is brought necessarily measures the relief to which the claimants are entitled, and limits, while it confers, the jurisdictional authority in the exercise of which the court must act. So far as the court's ordinary jurisdiction is concerned, the claimants' grievances are at an end. Their demands at law growing out of the contract were merged in the judgment. The judgment was satisfied. All demands at law were forever extinguished. As to the soundness of the judgment, as to the correctness of the construction which this court gave to the contract, they are conclusions in which the claimants in a legal sense acquiesced, aud which cannot be inquired into now. If they were erroneous, they might have been corrected by appeal; but, so far as they are now involved, they must stand as unquestionable law. The controversy, whatever it is, must be kept within the bounds of the. private act, which is in the following terms:
"That the claim of James W. Harvey and James Livesey for alleged labor done and materials furnished under their contract with the United States for the building of the masonry-work for the piers and abutments of the bridge across the Mississippi River from Rook Island to Davenport, Iowa, bearing date June first, eighteen hundred and sixty-nine, be, and the same is hereby, referred to the Court of Claims for hearing and adjudication, and to that end jurisdiction is hereby conferred on said court to proceed, in the adjustment of the accounts between said claimants and the United States, as a court of equity jurisdiction, and may, if according to the rules and principles of equity jurisprudence, in its judicial discretion, reform said contract and render such judgment as justice and right between the claimants and the said Government may require." (Act 14=th August, 1876,19 Stat. L., p. 490, chap. 279.)
The question of construction which it presents is a very simple one, viz, whether Congress intended to supply a defect of jurisdiction which, in the former action, might have prevented complete justice from being done; or whether they intended to undo all that had been judicially done and give the claimants an opportunity of re-opening demands, all of which were in a legal sense extinguished, aud some absolutely satisfied. Manifestly, in our view of the case, the purpose of the statute was to supply a defect and not to duplicate litigation. The court is to act as a court of equity, aud not to act, as it before might have acted, as a court of law. What has been done is to remain fixed, and what before could not be done is to be the sole subject of judicial ascertainment. The court is to proceed simply " as a court of equity jurisdiction ," and the accounts which' it may adjust and the relief which it may give must be limited to matters not before determined because of its inability to sit as a court of equity.
As to the petition which has been demurred to, it is sufficient to say that it is good as a declaration at law, and is therefore bad as a bill in equity. The matters which it sets up might be inquired into by any court of common-law jurisdiction, but its averments are absolutely silent as to any matter requiring the interposition of a court of equity. It does indeed ask the court "to reform the said contract, if the same be necessary, so as to make the same conform to the intention of the parties; " but the jurisdiction of a court of equity in such cases does not depend upon the relief sought for, but upon averments showing that the party is entitled to some specific redress as to which a court of law is incompetent to give relief.
The power of a court of equity to reform the terms of a written contract rests on fraud, mistake, or a grossly unconscionable advantage obtained by one party over another. It is only to establish such facts that parol evidence may be admitted to vary or contradict the terms of a written agreement; and the aver-ments in the bill setting them up present the primary or fundamental issues on which equity jurisdiction in such cases depends. In other words, it must primarily be alleged and proven that the written contract does not represent the true agreement.
But it is not essential that there be two proceedings. When the fact is established that the terms of a written contract should be reformed, a court of equity will act upon the well-established principle of equity jurisprudence of considering that which ought to be done as actually done, and will give effect to the instrument "not as it is, but as it would be if the fraud or mistake had never existed." (2 Ldg. G. in'Eq., 682.) For this reason the bill must be complete, showing the fraud, mistake, or wrong upon which the equitable relief depends, and then, by proper allegations, the facts which will entitle the party to recover upon the reformed agreement, and enable the court to determine the extent of the relief which should be awarded to him.
The demurrer is sustained, with leave to the claimants to file an amended petition.