delivered the opinion of the court:
This case comes before the court in two distinct forms : First, in that of an action brought by the Union Pacific Eailroad Com*576pany to recover one-half of certain freight-earnings withheld from it by the Government. Second, in that of a cross-action brought by the United States to recover back the interest which they have paid to third persons upon their bonds heretofore loaned to the company to aid it in the construction of its road. The company admits that the Government has the right to withhold one-half of such moneys as the road may earn by .the transportation of mails and military and other supplies. The United States insist that they may withhold all of these earnings and apply them in payment of their advances already made, or maintain their action for the interest on the instant that it is paid to the holders of the bonds.
The statutory history of the case, briefly stated, is this : The act of 1862 provided that the United States should loan to the company Government bonds upon condition that the Government have the right to withhold all of the moneys that might become due to the company for the transportation of mails and military and other supplies, and apply the amounts thus withheld to the principal and interest of the debt. The act of 1864 substituted a half for the whole and assured to the company the right of present payment to the extent of one-half of its earnings.. The act of 1871 “ directed” the Secretary of the Treasury to pay this half as provided by the'act of 1864, he having then recently withheld the whole. The act of 1873 u directed” the Secretary to withhold “ all payments” “ to the amount of payments made by the United States for interest,” and provided for testing judicially the right of the company 11 to recover the same” and the right of the United States to recover back its advances.
It is to be noted at the threshold of the case that these two rights, if they' exist, are distinct and independent. The company may have a valid cause of action agaihst the Government and the Government may have a valid cause of action against the company, and the validity of either will not necessarily impair the validity of the other. When both of these rights can be asserted in the same suit by action and cross-action, the greater will practically swallow up the less, but will not in a legal sense defeat it. The court in such a case simply credits to each party what he is entitled to recover, and renders judgment in favor of one for the balance.
So far as the company’s side of the case is concerned, it is manifest that its right of action must be maintained. For a *577valuable service rendered, a present debt accrues, unless tbe parties have expressly provided that payment shall be deferred or appropriated to a particular purpose. In this case that purpose was declared by the act of 1864, which authorized the withholding of half, but assured the payment of the remainder. Under that act, and prior to any subsequent legislation, the whole of the railway was constructed by the one party and all of the bonds were issued by the other. Therefore that statute, in every legal and moral sense, measures the rights and the liabilities of the parties. The real and important question in the case is whether the United States can maintain their action to recover back the interest which they have advanced; and its importance is magnified (as was suggested by the learned Assistant Attorney-General) by the possibility of this resulting consequence: that if they cannot maintain this action now, they may not be able hereafter to charge interest upon their advances.
In approaching the decision of the case, the court has considered, but cannot adopt, the proposition maintained by the learned counsel of the claimant, that the payments made for several years by Secretary McCulloch constituted a contemporary construction of a contract by the parties such as courts are ordinarily bound to adopt. The Secretary was not the contracting agent of the Government, but simply its administrative officer for carrying out the provisions of the law. Moreover, there' was no express contract in' these transactions to be the subject of contemporary construction. A statute may contain the elements of a compact by pledging the public faith ; but it is nevertheless to- be construed according to the rules for statutes, and not according to the rules for contracts. In cases of contract, it is the purpose of courts to ascertain and give effect to the real intent of the parties. Ordinarily this is to be deduced from the words of the instrument; but where the parties, at the time of their performing, by their mutual acts give their own meaning to their own words, courts adopt it as the true meaning, however illogical or foolish it might otherwise be deemed. The mutual understanding and agreement of the two opposite minds is the one thing to be found, and when it is ascertained, the work of interpretation is ended. In cases resting on statutes there is no mutuality of agreement to be sought out. All the terms of the compact are dictated and *578accepted by one side, and the only intent which judicial construction can make certain is the intent of the legislative power.
Neither do we think the court precluded from going to the merits of the case by the doctrine of estoppel invoked by the same learned counsel. It was urged with great earnestness that the Government is now estopped from setting up a doubtful construction, because, by its former policy of paying, it misled the'company into subjecting itself “ to ten- forfeitures, carrying its entire rights and, property.” But the Government is not now asserting a forfeiture. An equitable estoppel only precludes a party from asserting that which in good conscience he ought not to assert. If this money be owing to the Government, good conscience does not require it to refrain from collecting the debt; for enforcing collection of a debt due works no legal' wrong to the debtor. When the Government attempts to enforce these ten forfeitures the doctrine of estoppel may be applicable. To apply that doctrine to a suit for the collection of the debt without asserting forfeiture would be carrying the doctrine beyond its well-settled and rational bounds.
Neither do we attach to the act of 1871 the conclusiveness attributed to it by the claimant’s counsel. As before shown, the company had a demand against the Government for services rendered, and the Government had a demand against the company for money advanced to its use. It was perfectly consistent with the reservation of its rights for the Government to pay its debts to the company without compelling the company to pay its debts to the Government. In 1871 a Secretary of the Treasury asserted this right of set-off, which up to that time had lain dormant, and refused to pay the debt of the Government to the company. By the act of 1871 Congress interposed, and directed the Secretary in effect not to assert this right of set-off, but to go on paying the debts of the Government as before. By the act of 1873 Congress interrupted the policy of allowing the company a credit for the advance, and u directed” the Secretary to assert for the Government the right of set-off, or, in other words, to insist to that extent upon the payment of the company’s debts to the United States. If these advances for interest became debts of the company, due and payable as fast as they were made, the Government might rightfully and legally do one of two things: either it might treat them as *579fresh loans and charge interest upon them from the moment they were made, or it might insist upon their immediate repayment, in whole or in part. The act of 1871 authorized the credit; the act of 1873 insisted on the payment. The one did not extend to any cause of action belonging to the Government ; the other did not infringe any right vested in the company ; both left the original compact entirely untouched, as it stood declared by the statutes of 1862 and 1864.
We now come to the final question in the case.
The acts of 1862 and 1864 declared and still define the bargain, whatever it may be. The learned Assistant Attorney-General insisted that those statutes, in legal contemplation, are nothing more than a charter of and grant to the company, and that the consideration moving to the United States is in legal effect nothing more than the consideration of public benefit which is theoretically received for every statute creating a body-corporate. It is well known to “every one that when these statutes were passed the United States were threatened with dismemberment, and that thoughtful persons apprehended with concern the possibilities of the territory of the republic falling into three parts, and of the portion west of the Eocky Mountains, separated .by deserts and cut off by natural barriers, forming an independant sovereignty. It is also equally well known that constantly-recurring Indian hostilities upon the plains rendered some means of speedy transit indispensable. Finally, it is equally beyond dispute that the Government was possessed of quantities of unsalable lands, which it desired to bring within the reach of purchasers. Considerations, therefore, political and financial, of no common magnitude, must have operated upon the legislative mind as inducements for all the franchises and grants which those statutes created and conferred. Nevertheless, the magnitude of the consideration does not change the character of the legislation nor vary the rule of construction by which the rights of the grantee must be measured. The judiciary can never weigh the advantages that a particular grant secured to the Government, nor say in one case, “Here the consideration was so great that the statute should be deemed a contract and construed liberally; ” and, in another, “Here the consideration was so small that no reciprocal advantages accrued to the Government, and the statute must be deemed a grant and construed strictly against the grantee.”
*580But these acts of 1862 and 1864 contain something more .than provisions to create a corporation or confer upon it franchises and grants. The statutes really embody both a charter and a compact. As to those provisions which create the corporation, which limit its rights and franchises, which prescribe its obligations to the public, and confer grants and benefits upon it, the statutes are nothing but a charter; but as to those provisions which bind the Government to do something, which cast distinct obligations upon it, which carry it into the region of mercantile transactions, and make ittake afinancial part in the enterprise, the statutes belong to that class of legislation which is to be so construed as to carry out the liberal and just intent of the legislature. The rights and duties of the company as a body-corporate are not involved in this suit; the things which the Government agreed to do or not to do form the only subject for determination.
When the project of embarking the United States in this enterprise, by loaning Government bonds to the Pacific railways, was sanctioned, three contingencies must have been contemplated by Congress: 1. That the earnings of the company'in the way of Government transportation would be substantially equal to the interest on the bonds; a contingency most unlikely, although the Government could regulate the quantity of freight which it would send over the roach 2. That the earnings of the company would be materially greater than the interest; a contingency that would remove all question of present indebtedness, and tend to reduce the principal of the debt long before the bonds would mature. 3. That the earnings and five per centum would be materially less than the interest; a contingency that has actually happened. The amount which the Government was to loan to the company was known with tolerable certainty, and the earnings of the company could be found with some approximation to truth by ascertaining the quantity of freight which the Government would be likely to send over the road and the rates which would probably be charged. It was within the power of Congress to have provided that each party should pay its debts to the other as they accrued, and it was also within its power to make some other and more complicated .arrangement, by which each to some extent should share in the risks of the enterprise and participate to some extent in its success. The simplest form of *581transaction would have been that the one party should pay' the freight-bills whenever they were presented, and that the-other should refund the interest so soon as it was advanced. Was that the substance of the obligation which Congress assumed toward and exacted of this company ?
The act of 1862 fixed the time when the principal of the debt should become due, by saying the “ company shall pay said bonds at maturity.” With regard to the interest the act is not equally explicit, but, so far as its express provisions go, it provides this mode of payment: “All compensation for services rendered for the Government shall be applied to the payment of said bonds and interest until the whole amount is fully paid f.u and after said road is completed, until said bonds and interest are paid, at least five per centum of the net earnings of said road shall also be annually applied to the payment thereof.-”
And this is all which the act provides. First, services rendered to the Government; second, a portion of the net earnings of the company.
It is a fundamental principle of law that when one man pays money to the use of another a present debt immediately ensues* But it is doubtful whether this can be interpolated into a statute, and it is not applicable when there is an express agreement which prescribes a different time or a specific mode of payment. These provisions of this statute are not followed by a declaration saying in effect that, if a balance of interest remains after the application of these sources of payment, such balance of interest shall become immediately due and payable. On the contrary, the time and mode of payment, so far as they are expressly designated by the statute, are satisfied by the application of the moneys derived from those two sources.
The Assistant Attorney-General has argued that these were not intended to be the exclusive sources whence the repayment of interest on the bonds might be drawn; but that they were “ inserted to create a sinking-fund for the ultimate payment of the bonds,” inasmuch as lands were to be sold by the company “ on which the Government originally held a mortgageP If the amount derived from those two sources, it was said, should exceed the interest on the bonds, the Government would put aside the remainder as a fund for the final extinction of the debt, and would allow interest to the company upon it. However judi-' cious and just such a course might have been, there are two *582reasons wby the court cannot give such a construction to the statute. In the first place, it does not provide for a sinking-fund, (which is an artificial means for paying a debt unknown to the law, and necessarily the creation of express agreement or express enactment,) nor does it authorize the alio wance of interest on any such fund, nor couple these two sources of revenue with any object save that of being “ applied to the payment of such bonds and interestP In the second place, though lands were to be sold upon which the Government held a mortgage, still the the avails were to go into the road upon which the mortgage rested. The form of the security changed, but the mortgage followed the proceeds; the security was transmuted, but not relinquished, and the change from unsalable lands to a completed railway, in the contemplation of Congress, might have increased its value.
Moreover, (and this is the chief point in the case,) the statute makes no distinction between principal and interest, nor indicates in any way that -the debt for the one shall mature at a different time than the debt for the other. Furthermore, a previous section of the statute declares that for “ the amount of said bondsf 11 together with all interest thereon which shall have been paid by the United States,” they shall constitute a mortgage upon the road. In the present predicament of the transaction, the Government is largely in advance for interest; and there at first appears to be no consideration received which should bind it to suffer a serious, if not disastrous, loss. But if we reverse the condition of affairs, it will be seen that a similar loss would fall upon the company, and a corresponding gain inure to the Government. That is to say, if the Government had required a larger amount of transportation, and the net earnings had greatly exceeded the reality, so that the two more than equaled the interest, then the company would be paying off the principal of its ultimate indebtedness to the Government long before the Government would be paying its debts to the bondholders. And as the company has mortgaged its road “ to secure the repayment” “of the amount_ of said bonds f “together with all interest thereon which shall have been paid by the United States,” a corresponding loss of interest, upon interest would likewise fall upon it. Now, when the statute has provided two sources for the payment not only of interest, but of a great deal more — that is to say, of a portion of the principal before it becomes due — what reason *583can there be for the judiciary to interpolate, by mere construction, a third source into the statute ? Assuredly none. If the statute had stopped at interest, and had provided that the remainder, if any, of the transportation-moneys and five per centum should be paid to the company, there would be good reason for saying that a reciprocal obligation was implied, and that the company should be held liable to make the interest-account whole. But, in the plight in which Congress has placed the-reciprocal and intermingling rights and interests of the parties, we perceive no reason why the Government should call the the varying balance of its advances a liquidated present debt, subject to immediate collection.
But beyond the confines of all disputed construction there remains one uncontroverted provision in the statute, which seems decisive of the legislative intent. The only party to whom an option was reserved by the act is the Government, and that ■option is the important right of making the company’s services as little or as great as it pleases. If it. requires these services, the company cannot withhold them j if it refuses .all employment, the company cannot exact it. As the compact originally stood, the Government could keep down this interest without the expenditure of any ready money, by simply furnishing to the company this employment, and it might push the advantage to an unlimited extent, even to carrying the earnings of the road to the liquidation of the debt before it had matured. The subsequent statute, which substituted a half, for the whole of the earnings, did not affect the legal import of the Government’s reserved discretion, nor change the legal relations of the parties, nor vary the construction applicable to the original statute. It was an alteration in degree and not in kind, and still left the company in this matter of service entirely subject to the orders of the Government. In contemplation of law, the wrong and injury of which the Government complains are entirely of its own choosing. Courts of law cannot be invoked to aid persons where they themselves possess the means of redress. If an ordinary party were to come into another court with such a complaint, he would be told, “Either you have willfully withheld this employment from the other contractor or you have been unable to furnish it to him. If the former supposition is the fact, then the fault is your own, and you cannot ascribe wrong to one who, .you confess, has always been willing to repay you in the man-*584uer which your agreement prescribes. If the latter is the fact,, then, because the sources of payment which you provided disappoint you, and because the payment in kind which you elected to fake gives you more of the transportation-service than you really require, you are trying to shift your loss to other shoulders than your own. Your misfortune is really this, that you made an improvident bargain.”
The judgment of the court is that the claimant recover of the defendants the sum of $512,032.50, and that the counterclaim of the defendants be dismissed.
Bichardson, J., was absent when this case was decided.