
751 P.2d 5 (1988)
Harold J. MOENING and Colleen M. Moening, Appellants,
v.
ALASKA MUTUAL BANK, Appellee.
No. S-1980.
Supreme Court of Alaska.
February 26, 1988.
*6 Francis J. Nosek, Jr. and Kelly Fisher, Anchorage, for appellants.
Gordon F. Schadt and Milford H. Knutson, Anchorage, for appellee.
Before MATTHEWS, C.J., and RABINOWITZ, COMPTON and MOORE, JJ.

OPINION
COMPTON, Justice.
This appeal presents three questions. The first question is whether a secured creditor initially may ignore the security and sue for a personal judgment on the underlying debt, absent an agreement to the contrary. The second is whether the creditor agreed to limit its remedy to foreclosure of the security. The third is whether the suit on the debt extinguishes the security as a matter of law.

I. FACTUAL AND PROCEDURAL BACKGROUND
Harold Moening and Ronald Rivard became business associates in 1983. Prior to their association, Rivard was the sole shareholder of Quest Enterprises, Inc. (Quest). Moening agreed to guarantee Quest's debts to Alaska Mutual Bank *7 (AMB) in exchange for a 40% interest in the business.[1]
To effectuate the guarantee, Moening executed a $700,000 deed of trust note in favor of AMB.[2] The note was secured by a deed of trust on Moening's home, and on the property which originally secured the Quest obligations extinguished by the consolidation. Moening defaulted. Later Moening executed a secured promissory note for $33,000 to guarantee the debt for property purchased by Quest in Peters Creek.[3] Moening defaulted on this note as well.
AMB filed a complaint against Moening seeking a personal judgment on the notes. It did not foreclose the deeds of trust nor attempt to exercise the power of sale. The superior court entered summary judgment for AMB, concluding that AMB had the right initially to ignore its security and sue on the note. The court entered a money judgment for $733,000 in principal due on the notes, plus accrued interest, costs, and attorney's fees. In addition, the court ordered that the notes should be filed with the court, marked "Conditionally Cancelled" and, "if subsequent execution on the judgment does not satisfy it, the amount by which it is not satisfied may form the basis of judicial or non-judicial foreclosure of the collateral securing the promissory notes."
Moening appeals on the grounds that (1) as a matter of law, AMB must exhaust the security first; (2) AMB agreed to exhaust the security first; and (3) AMB waived its security by suing on the notes.[4] For the reasons hereinafter set forth, we affirm the judgment of the superior court.

II. THE RIGHTS OF A SECURED CREDITOR
Moening argues that a secured creditor may not ignore the security and sue on the underlying obligation; it must first exhaust the security. AMB contends that a secured creditor has the option to foreclose or sue on the note, and that it may pursue these remedies concurrently or consecutively.
Statutes provide a secured creditor with a variety of remedies when the debtor defaults. For example, the creditor may bring an action for judicial foreclosure. AS 09.45.170.[5] The creditor is then entitled to a deficiency judgment against the debtor. Id.; Smith v. Shortall, 732 P.2d 548, 549 (Alaska 1987); Suber v. Alaska State Bond Comm., 414 P.2d 546, 555-56 (Alaska 1966). The debtor has a statutory right of redemption for twelve months after the sale is confirmed. AS 09.45.190, 09.35.250.
The creditor may elect to conduct a nonjudicial foreclosure sale if the deed of trust provides for this remedy. Suber, 414 P.2d at 555-56; AS 34.20.070(a).[6] The creditor *8 is not entitled to a deficiency judgment following a nonjudicial foreclosure. Smith, 732 P.2d at 549; AS 34.20.100.[7] The debtor is not entitled to redeem the property, unless the deed of trust provides otherwise. AS 34.20.090(a).
Statutes also refer to an action on the underlying obligation. Alaska Statute 09.45.200 provides:
During or after the pendency of an action for the recovery of a debt secured by a lien mentioned in AS 09.45.170, an action cannot be maintained for the foreclosure of the lien unless judgment is given in that action that the plaintiff recover the debt or a part of it, and an execution issued in the action against the property of the defendant is returned unsatisfied in whole or in part.
The clear implication of this section is that the creditor may sue directly on the note without first foreclosing the property. Moreover, if the creditor prevails in the legal action and cannot satisfy the judgment against the debtor's personal property, it may then maintain an action for judicial foreclosure of the security.
The superior court order also permits AMB to foreclose nonjudicially if the judgment on the note is returned unsatisfied. Moening argues that, even if AMB initially may ignore the security, it may not foreclose nonjudicially after obtaining a judgment on the note.
The anti-deficiency statute prohibits a deficiency judgment following exercise of a power of sale; however, it does not preclude the exercise of a power of sale following a judgment on the note. AS 34.20.100, supra note 7. Under the common law, a prior suit on the note does not preclude subsequent judicial or nonjudicial foreclosure of the security. Foothills Holding Corp. v. Tulsa Rig, Reel & Mfg., 155 Colo. 232, 393 P.2d 749, 751 (1964); Berg v. Liberty Fed. Savings & Loan, 428 A.2d 347, 348-49 (Del. 1981); Klondike, Inc. v. Blair, 211 So.2d 41, 42-43 (Fla.App. 1968). The doctrine of election of remedies does not apply, because foreclosure and a suit on the note are not inconsistent remedies. Klondike, 211 So.2d at 42; Norwood Realty v. First Fed. Savings & Loan, 99 Ga. App. 692, 109 S.E.2d 844 (1959); Skach v. Lydon, 16 Ill. App.3d 610, 306 N.E.2d 482, 485 (1973). See also 55 Am.Jur.2d Mortgages § 543, at 523 (1971).
We conclude that the statutes permit a secured creditor initially to ignore the security and sue on the note. Once the creditor obtains a personal judgment which is returned unsatisfied in whole or in part, the creditor may judicially or nonjudicially foreclose the security.[8]

III. THE PARTIES' AGREEMENT
When a note is executed and secured by a deed of trust, the documents are *9 read and construed together as one contract to ascertain the parties' intent. In re Sutton Inv., 46 N.C. App. 654, 266 S.E.2d 686, 689 (1980), rev. denied, 301 N.C. 90 (1980); Herrington v. Murphy, 446 P.2d 595, 597 (Okla. 1968). The contract is interpreted to give effect to the reasonable expectations of the parties, looking to the language of the contract, the circumstances surrounding its adoption, and case law interpreting similar agreements. Craig Taylor Equip. v. Pettibone Corp., 659 P.2d 594, 597 (Alaska 1983). Ambiguities are construed in favor of the debtor. Patton v. First Fed. Sav. & Loan Ass'n, 118 Ariz. 473, 477, 578 P.2d 152, 156 (1978).
Any agreement between the parties that the creditor will not seek a deficiency judgment and will look only to the security is enforceable. Stern v. Itkin Bros., 87 Misc.2d 538, 385 N.Y.S.2d 753, 754 (N.Y.Sup. 1975).[9] Such an agreement is enforced even when the security is destroyed by foreclosure of a superior lien. The formerly secured inferior creditor is not entitled to sue on the note. Laclede Inv. Corp. v. Kaiser, 596 S.W.2d 36, 39 (Mo. App. 1980).[10]
The $700,000 obligation was evidenced by a "deed of trust note." By its terms, Moening expressly promised to pay principal and interest. The note also stated:
[E]very party signing ... this note hereby ... binds himself thereon as a principal, ... and promises, if this note is not timely paid and is placed in the hands of an attorney for collection, or suit is brought hereon, to pay all costs of collection, including reasonable attorney's fees.
(Emphasis added). The note constitutes a personal obligation of Moening. It does not preclude AMB from suing directly on the note.
The $33,000 debt is evidenced by a "single payment promissory note" in which Moening expressly promised to pay principal and interest. In case of default, Moening agreed to pay AMB's collection costs and attorney's fees. It does not limit AMB's ability to sue Moening.
The deeds of trust securing the loans contain a power of sale provision permitting nonjudicial foreclosure. The trust deeds also expressly allow judicial foreclosure.[11] They do not limit the creditor's right to ignore the security and sue on the note.

IV. CANCELLING THE NOTES AND TRUST DEEDS
When AMB submitted a proposed judgment on the notes, Moening objected because the judgment did not include an order cancelling the notes and deeds of trust under Civil Rule 78(d).[12] AMB submitted the original notes to the court, but did not submit the trust deeds. AMB requested that the notes not be cancelled in case the personal judgment was returned unsatisfied. The superior court ordered that the notes be marked "Conditionally Cancelled." Moening argues that the superior court erred by failing to unconditionally cancel the notes and trust deeds, entering the order without adequate briefing, and entering *10 the order after the notice of appeal was filed.
When judgment is entered on a written instrument, the instrument shall be filed with the court and cancelled on its face, unless the court orders otherwise. Civil Rule 78(d). We perceive no reason why a secured note should not be subject to this general rule. The note merges with the judgment, and any further proceedings will be to enforce the judgment rather than the note.
In contrast, the deeds of trust should neither be filed with the court nor cancelled:
[A] judgment recovered upon a debt secured by a mortgage does not merge the mortgage nor operate as a discharge, abandonment, or release of the mortgage security.
... The mortgage continues to secure such debt and is not released, discharged, or satisfied by a judgment on the debt, note, or bond. Such judgment stands subordinate to the mortgage lien.
Silver v. Williams, 70 N.J. Super. 456, 175 A.2d 673, 676 (1961) (emphasis in original), rev'd on other grounds, 72 N.J. Super. 564, 178 A.2d 649 (1962). In essence, the creditor ends up with a secured judgment.
Although the superior court could have simply cancelled the notes, it had discretion under the rule to order otherwise. The conditional cancellation order does not constitute an abuse of that discretion.[13]
AFFIRMED.
BURKE, J., not participating.
NOTES
[1]  Colleen Moening is a named defendant because she co-signed many of the obligations with her husband Harold Moening.
[2]  The principal was payable on demand in a single installment. Absent a demand, the note was due on May 7, 1985.
[3]  The note was secured by a deed of trust identical to that securing the $700,000 note. The trust deed is not part of the record.
[4]  Moening also argues that AMB failed to join indispensable parties (Rivard and Quest). Alaska R.Civ.P. 19(b). This is an action to collect a debt. Neither Rivard nor Quest was a party to the note and neither has an interest in this lawsuit. Civil Rule 19(a)(2). Moreover, their absence does not preclude granting complete relief between Moening and AMB. Civil Rule 19(a)(1). The fact that Moening may have claims against Rivard arising from other agreements, or that Rivard and Quest may have interests of record in the security, does not render them indispensable to AMB's suit on the note.
[5]  AS 09.45.170 provides:

A person having a lien upon real property, other than that of a judgment, whether created by mortgage or otherwise, to secure a debt or other obligation may bring an action to foreclose the lien. In the action, the court may direct the sale of the encumbered property or a portion of it and the application of the proceeds of the sale to the payment of costs, expenses of sale, and the amount due the plaintiff. The judgment shall also determine the personal liability of a defendant for the payment of the debt secured by the lien and be entered accordingly.
[6]  AS 34.20.070(a) provides in part:

If a deed of trust is executed conveying real property located in the state to a trustee as security for the payment of an indebtedness and the deed provides that in case of default or noncompliance with the terms of the trust, the trustee may sell the property for condition broken, the trustee, in addition to the right of foreclosure and sale, may execute the trust by sale of the property, upon the conditions and in the manner set forth in the deed of trust, without first securing a decree of foreclosure and order of sale from the court
....
(Emphasis added).
[7]  AS 34.20.100 provides:

When a sale is made by a trustee under a deed of trust, as authorized by AS 34.20.070  34.20.130, no other or further action or proceeding may be taken nor judgment entered against the maker or the surety or guarantor of the maker, on the obligation secured by the deed of trust for a deficiency.
[8]  In Smith v. Shortall, 732 P.2d at 549, we held that a spouse who nonjudicially foreclosed a deed of trust securing her former husband's property division obligation was not entitled to a deficiency judgment under AS 34.20.100. In dicta we stated:

The obligation was evidenced by a promissory note and secured by a deed of trust. When [Debtor] defaulted on the obligation, [Creditor] had several options. She could have waived the security of the deed of trust and sued on the note. Or, she could have brought an action to judicially foreclose the deed of trust, retaining the right to recover a deficiency judgment. AS 09.45.170; Suber v. Alaska State Bond Committee, 414 P.2d 546, 555 (Alaska 1966). Instead, [Creditor] elected the remedy of non-judicial foreclosure. By electing this remedy, [Creditor] lost her right to recover a deficiency judgment against [Debtor].
Id. We disapprove of this dicta insofar as it suggests that a suit on the note constitutes a legal waiver of the security.
[9]  A rider to the Stern mortgage provided in part:

On default hereunder, no deficiency judgment shall be sought, rendered or entered against the mortgagor and mortgagees will look only to the mortgaged premises.
385 N.Y.S.2d at 754.
[10]  The Kaiser note contained the following provision:

No personal liability shall be asserted or be enforceable against the maker, it being intended that the sole remedy of the holder hereof be by the foreclosure of the Deed of Trust and Security Agreement....
596 S.W.2d at 39 n. 1.
[11]  The trust deed states in part:

In the event that this Deed of Trust is foreclosed as a mortgage and said property sold as a foreclosure sale [the purchasers may make necessary repairs or alterations]....
[12]  Alaska R.Civ.P. 78(d) provides:

In all cases in which a judgment upon a written instrument is entered, such instrument shall be filed with the court, and unless the court otherwise orders, it shall be cancelled by marks and writing upon its face. The clerk shall retain the same in the files unless otherwise directed by the court.
[13]  The record does not support Moening's assertion that the conditional cancellation order was entered after Moening filed a notice of appeal. The order was entered on January 7. The notice of appeal contains an initial filing stamp of December 19; however, that stamp was cancelled and the notice shows a second stamped filing date of January 7.
