
184 Cal.App.3d 833 (1986)
229 Cal. Rptr. 509
STANLEY J. ARMSEY, Plaintiff and Respondent,
v.
CHANNEL ASSOCIATES, INC., Defendant and Appellant.
Docket No. B016014.
Court of Appeals of California, Second District, Division Six.
August 21, 1986.
*835 COUNSEL
Arthur H. Weed for Defendant and Appellant.
Cappello & Foley and Scott B. Campbell for Plaintiff and Respondent.
OPINION
STONE, P.J.
Here we are asked to decide the proper method of determining indebtedness remaining after foreclosure sale of an all-inclusive deed of trust where the foreclosing beneficiary remains liable on the underlying liens. Channel Associates, Inc., appellant herein and trustor under an all-inclusive deed of trust on property sold by respondent, Armsey, contends that a beneficiary of an all-inclusive deed of trust has no amount owing him where the difference between the total indebtedness at time of foreclosure and the beneficiary's successful bid at foreclosure sale equals prior senior liens on the property. Armsey counters that the trial court correctly determined that the indebtedness remaining after the foreclosure sale is the difference between the total amount owed pursuant to the terms of the all-inclusive foreclosed deed of trust and the amount of the successful bid. We affirm the judgment.

FACTS
November 12, 1981, Armsey sold a commercial office building to Channel for $700,000; $100,000 down payment and a promissory note for $600,000 secured by an all-inclusive trust deed (AITD). In March 1982, the property was destroyed by fire and in October 1983, Channel defaulted on its obligations under the purchase agreement. Armsey purchased the property at foreclosure sale June 11, 1984, with a credit bid of $456,525.73 and filed an action for declaratory relief to determine entitlement to fire insurance proceeds of $98,796.89. The parties stipulated at trial, that at time of foreclosure sale, Channel owed Armsey $621,000, including underlying balances of $105,094.84 owed to Bank of Montecito pursuant to a note and first deed of trust, and $53,723.72 owed to Clarence and Stella Rouse, secured by a second deed of trust. Armsey purchased the property at foreclosure sale subject to the notes secured by the first and second deeds of trust. Bank of Montecito does not claim an interest in the insurance proceeds and Clarence and Stella Rouse assigned any interest they might have in said insurance proceeds to Armsey.
The AITD provided, in pertinent part, that it was given to secure payment of the indebtedness evidenced by "one Promissory Note of even date herewith *836... in the principal sum of $600,000.00 payable to beneficiary....," and that "[t]he amount collected under any fire or other insurance policy may be applied by beneficiary upon any indebtedness secured hereby, and in such order as beneficiary may determine, or beneficiary may release all or part thereof to Trustor...."
Channel argued at trial that Armsey could recover only that portion of insurance proceeds commensurate with the harm he had suffered and if Channel remained liable to pay the first and second trust deeds, Armsey could not claim these amounts as "harm." Armsey claimed the balance of the two trust deeds as "indebtedness remaining after the foreclosure sale," thus subject to satisfaction from the insurance proceeds; the trial court agreed and the instant appeal ensued.
The sole question presented is whether an indebtedness remained after foreclosure.

DISCUSSION
(1) An AITD is a security device whereby the amount of indebtedness owed by the trustor includes a debt owed by the beneficiary to the beneficiary of another deed of trust, senior in priority, and secured by the same property. (See 1 Miller & Starr, Current Law of Cal. Real Estate (1975) § 3:19, pp. 345-346.) In this case, the AITD or overriding deed of trust included the aforementioned two senior liens. Under the terms of the AITD, Armsey remained liable for payments on the underlying notes and Channel was obligated to make monthly payments to Armsey in an amount large enough to satisfy all indebtedness on the property. As stated in Miller & Starr, "[i]n some cases the overriding deed of trust is referred to as a `first' lien on the property. However, since there is already an existing first lien on the property for the overriding deed of trust to `wrap around,' the overriding deed of trust is by definition a second lien against the property. On the other hand, if the beneficiary of the overriding deed of trust is personally liable for the obligation secured by the existing lien, and the trustor is not, then it can be argued that there is only one obligation owed by the trustor which is being secured by the single lien." (1 Miller & Starr, op. cit. supra, § 3:19, p. 346.)
(2a) A bid by a lienholder of the entire unpaid amount of the indebtedness at foreclosure by sale, i.e., a full credit bid, operates to extinguish the lien and the lienholder is not entitled to any part of a fund of money resulting from injury to the property. (Cornelison v. Kornbluth (1975) 15 Cal.3d 590, 607 [125 Cal. Rptr. 557, 542 P.2d 981].) (3) A full credit bid is an amount equal to unpaid principal and interest of the mortgage debt, together with *837 costs, fees and other expenses of the foreclosure. (Id., at p. 606, fn. 10.) In other words, it is total satisfaction of the secured obligation.
(2b) If a beneficiary bids less than the full amount of obligation owing to him, a deficiency balance of the debt remains to which he may seek entitlement from insurance proceeds. Extinguishment of the deed of trust by foreclosure does not affect his right to be paid the remainder of the debt under the policy. (Cornelison v. Kornbluth, supra, at p. 607.) His security has been impaired and he may recover the difference between the amount bid and the full amount of the obligation outstanding immediately prior to foreclosure sale. (Rosenbaum v. Funcannon (9th Cir.1962) 308 F.2d 680, 685.)
(4) While section 580b of the Code of Civil Procedure prohibits a judgment against a debtor following foreclosure, it does not prevent a creditor from realizing on additional security. (Redingler v. Imperial Savings & Loan Assn. (1975) 47 Cal. App.3d 48, 50 [120 Cal. Rptr. 575].) The debtor-creditor relationship between the parties is not totally extinguished during foreclosure proceedings where the beneficiary purchases property for less than the amount of the balance due under the deed of trust. (Ibid.) Thus, the mortgagee is entitled to insurance proceeds up to the amount of indebtedness remaining after foreclosure sale.
Since the mortgagee has an interest in the policy only as security for his debt, it follows that such interest ceases whenever the debt is discharged and there is no longer the relation of debtor and creditor. (Reynolds v. London Etc. Ins. Co. (1900) 128 Cal. 16, 19 [60 P. 467]; see also Duarte v. Lake Gregory Land and Water Co. (1974) 39 Cal. App.3d 101 [113 Cal. Rptr. 893]; Rosenbaum v. Funcannon, supra, 308 F.2d 680; People ex rel. Dept. of Transportation v. Redwood Baseline, Ltd. (1978) 84 Cal. App.3d 662 [149 Cal. Rptr. 11]; Brown v. Critchfield (1980) 100 Cal. App.3d 858, 868 [161 Cal. Rptr. 342].)
(5) Channel contends no indebtedness remained after foreclosure because, under the terms of the AITD, it agreed "[t]o perform the obligations secured by such included deeds of trusts,..." Thus, according to Channel, a mortgagee who bids the entire amount owed him at foreclosure sale based on a trust instrument in which the trustor-mortgagor has earlier assumed all outstanding indebtedness, has, in fact, made a full credit bid. We disagree.
Channel confuses equity with indebtedness. It is true that if Armsey sold the property for cash, he would not realize full value since he would have to pay the senior liens. He would realize only the value of his equity. (See Schrader, The Wrap-Around Mortgage: A Critical Inquiry (1973-74) 21 *838 UCLA L.Rev. 1529, 1538.) Nonetheless, under an all-inclusive or "wrap-around" deed of trust, the lender receives a security interest in the full face amount of the debt; the all-inclusive note includes not only the deferred portion of the purchase price, but also the unpaid balance of the promissory notes secured by the prior encumbrances. (Id., at pp. 1534-1535; Cal. Real Property Sales Transactions (Cont.Ed.Bar 1981) Seller Financing, § 5.26, p. 377.) Under the terms of the promissory note here, Armsey was obligated to pay the underlying notes; Channel's obligation was to Armsey. However, the indebtedness under the AITD was the total amount of the three liens.
The proper method of foreclosing on an AITD in default is unclear: "One of the most difficult problems involved with the overriding deed of trust is the manner of declaring a default and conducting a foreclosure sale in the event of the trustor's default. Many title companies will not act as a trustee, nor will they insure the title of the purchaser at the trustee's sale, unless the overriding deed of trust contains provisions regarding the proper procedures for declaring a default and conducting the trustee's sale. [¶] ... When the trustor defaults in his payments due under the overriding deed of trust, since these payments also include the sums due under the senior included obligation, does he [the beneficiary] declare a default in failing to pay the installments due on both obligations, or only the installments due on the overriding deed of trust? Upon the foreclosure sale, does the beneficiary bid only the amount of his [] equity or does he bid the full amount ... remaining on the overriding debt? ... [¶] These questions should be answered by the terms of the overriding note and deed of trust. Since the beneficiary of the overriding deed of trust is obligated to pay the senior included debt, it should be provided expressly that a failure to pay the overriding note by its terms is a default under the overriding note and deed of trust only. The documents should also provide that the purchaser at the foreclosure sale is only purchasing the beneficiary's equity, and that the amount of the defaulted debt, and therefore the beneficiary's bid at the sale, is only the amount of his equity, after deduction of the amount due on the senior included debt; therefore, the purchaser at the sale receives his title subject to the senior included lien." (1 Miller & Starr, op. cit. supra, § 3:22, pp. 352-353.)
Here, the fire insurance policy was additional security on the total indebtedness. The senior liens were not in default as Armsey continued to make payments on those notes. He foreclosed only his own equity interest. However, the indebtedness set forth in the note and AITD was not extinguished because it exceeded Armsey's successful bid.
Although there is no California authority on point, in J.M. Realty Investment Corp. v. Stern (Fla. 1974) 296 So.2d 588, the District Court of *839 Appeal held that a mortgagor's default in making payments as required by the wrap-around mortgage entitled the mortgagee to foreclose for the entire balance including the first mortgage. If the mortgagee did not purchase the property at the trustee's sale, the clerk of court was directed to pay off the senior lien from the sale proceeds. Mortgagor therein made an argument similar to the one at bench, claiming it should be allowed to pay the difference between the balance due on the senior mortgage and that which the mortgagor argued was the mortgagee's second mortgage, rather than being required to pay the full amount of the "wrap-around" mortgage. The court said, "We have determined that in essence appellant mortgagor is seeking to have the court either modify or rewrite the provisions of the subject `wrap around' mortgage.... This court cannot and will not modify the terms of the instant mortgage as we are powerless to rewrite contracts in order to relieve one of the parties thereto from the apparent hardships of an improvident bargain ... [¶] Further, we find that the plaintiff seller's corporation by the terms of the wrap-around mortgage was liable on the [senior] mortgage and in absence of satisfaction thereof, the corporation's liability thereon would continue." (P. 589.)
We apply the same reasoning here. The parties stipulated that at foreclosure the total indebtedness was $621,000. As between Channel and Armsey, the AITD evidenced a single indebtedness for which Channel was liable. Armsey is entitled to the full benefit of his security interest.
Moreover, we find no injustice in the court's ruling. Armsey parted with land and building worth $700,000 and received land with no building but with the obligation to pay senior encumbrances. Channel has failed to explain how its receipt of insurance proceeds would be more equitable. Prior to default and foreclosure, Channel was responsible for the entire $621,000. We fail to see why default should credit them with the amount of the senior encumbrances. We will not rewrite the parties' agreement. Armsey was within his rights and the court did not err in awarding him the insurance proceeds.
The judgment is affirmed. Costs to respondent.
Gilbert, J., and Abbe, J., concurred.
