The defendant and his partner (now deceased,) contracted with the Nashua and Rochester Railroad Company to *593build portions of its road. They sub-let some of the work to the plaintiffs. The amount of compensation to be received both by the plaintiffs and the defendant, under their respective contracts, depended upon the estimate by the company’s engineer of the quantity of work done.
The plaintiffs at the end of their employment demanded payment for work done by them beyond the requirement of their contract, and the defendant set up the same claim and other claims for extra work against the company. When the plaintiffs settled with the defendant, they accepted from him the sum duo to them under the engineer’s estimate, waiving their claim for extra work, and gave to him a receipt in full of all demands,- in consideration of a promise then made by the defendant that, if he got anything from the company for the extra work done by the plaintiffs, he would pay it to them; the defendant at the time asserting that he was bound to proceed against the company. The defendant did proceed against the railroad company and collected a portion of the claim.
Here is a conditional promise, the condition performed, and the question is whether the promise is supported by a legal consideration or not.
The defendant contends that the promise was upon a past consideration — that it was for services rendered before the date of the receipt in full.
We should denominate the past services as the motive which actuated the defendant in making the promise, the circumstance which induced him to make the conditional contract to pay, but not the legal consideration for his promise. It matters not that the defendant would not have promised but for the motive. The motive may have been the greater moral consideration. That is often the case. A man may make a contract, only because ho is thereby helping a relative or a friend, and be bound by it, there being a consideration for his promise. The promise to pay a debt voluntarily discharged is not binding. Warren v. Whitney, 24 Maine, 561. There must be a present consideration for the promise, but it may be slight. "If a contract is deliberately made without fraud,” said Wilde, J., in Train v. Gold, 5 Pick. *594384, "and with full consideration of all the circumstances, the least consideration will be sufficient.” The true legal consideration for the defendant’s promise was the waiver by the plaintiffs of their supposed claim by giving the receipt in full of all demands. The promise is founded upon a compromise. The defendant is not sued for the extra work, but for money which he promised to pay out of his collections from the railroad company.
It has been many times held that a compromise of a claim, understood by the parties to be doubtful, the nature and extent of which they are fully apprised, is a sufficient consideration to uphold an agreement, if the claim is honestly made and settled in good faith, even though it turns out that no valid claim ever existed. But it is otherwise, if the claim is utterly without foundation and known to be so, or if it is in its nature an illegal claim. The doctrine, however, should be applied with caution. It is a class of contracts where impositions and frauds may easily be practiced. But here the fact that the defendant did recover some part of the claim from the company is the best evidence, as between these parties, that there was some reasonable foundation for it. The case of Stapilton v. Stapilton, 1 Atk. 2, a leading case in support of the doctrine above stated, is reported in Leading Cases in Equity, to which numerous cases are added in a note by the American editors. See Turner v. Whidden, 22 Maine, 121.
We think, therefore, the instruction of the court on this branch of the case was correct. In one portion of the charge, when restating the proposition, the judge missed a proper and accurate expression of it, by inadvertently alluding to the motive or moral inducement as the legal consideration of the contract, but we think the jury could not have been misled by it. The exposition of the case was clear.
Another question came up in the trial. After the defendant settled with the plaintiffs, he sued the railroad company upon an account containing various claims for extra work, including that performed by the plaintiffs and settled by their receipt in full. The defendants’ whole claim in suit against the railroad amounted *595to about $75,000, and they received by way of compromise $25,000, for the total claim. The counsel for the defendant took the position that the claims sued against the railroad were of various kinds, some valid and some invalid, and that they never received anything specifically for the extra work of the plaintiffs, and they offered to show that the claim of the plaintiffs was really an invalid claim in law, though they believed the claim to be valid when their suit was commenced. They offered to show further, that they were advised by counsel that it was not valid, that they took the $25,000, in consequence of the advice, for all the sums sued for in their suit, and that their suit contained claims that were valid, amounting at least to the amount by them' received. The evidence was rejected. The judge ruled as a matter of law that the payment operated as a discharge and satisfaction of all the items and claims mentioned in the bill of' particulars in that suit, and a pro rata payment upon the claim "which represented the' extra work of the plaintiffs as much as upon anything else.
No error was committed by this ruling. The railroad company paid $25,000 for all the claims. It was a lump settlement. It wiped out all the claims against them. No distinction between the items was considered. Nothing was specifically paid or appropriated in discharge or satisfaction of one item more than another.
Paying $25,000 for $75,000 in that way, must pay as much on any one dollar as on any other dollar of the claim. It was the payment of a percentage on each and every dollar. This has a logic, amounting to a mathematical certainty. Not that such a settlement does more than raise a presumption that the plaintiffs’' claim was partly paid, but the offered proof does not remove the presumption. It does not show that the settlement in fact was only for the claims called valid. It may be a reason why the-defendant had better have so settled his suit against the railroad, if he could have done so. But non constat that the railroad company did not regard all the claims as equally valid, any one as good as any other. In the settlement made, the company took a receipt which specifically pays each and every claim contained. *596in the bill of particulars sued, because it pays them all. The receipt would bar any future suit for any or all of them. Phillips v. Moses, 65 Maine, 70; Phœnix Bank v. Bumstead, 18 Pick. 77.
Bxceptions overruled.
Appleton, C. J., Walton, Virgin, Libbey and Symonds, . JJ., concurred: