
514 N.W.2d 356 (1994)
2 Neb. App. 766
STATE of Nebraska, Appellant,
v.
Stacy L. HOWE, Appellee.
No. A-93-279.
Court of Appeals of Nebraska.
March 29, 1994.
*358 C. Jo Petersen, Seward County Atty., for appellant.
Kent F. Jacobs, Blevens & Jacobs, Seward, for appellee.
CONNOLLY, HANNON, and WRIGHT, JJ.
HANNON, Judge.
On September 4, 1992, the State of Nebraska, the appellant, charged appellee Stacy L. Howe with violation of Neb.Rev.Stat. *359 § 28-416(1)(a) (Reissue 1989), a Class III felony, alleging she distributed marijuana. Howe offered to plead guilty to a lesser-included offense, a misdemeanor. Howe claims she was entitled to plead guilty to a misdemeanor on the basis of a "Plea Agreement" entered into between herself and the county attorney. Howe requested that the trial court issue an order directing the county attorney to perform the agreement, reduce the charge to a misdemeanor, and accept her plea of guilty to the reduced charge. After a hearing, the district court found that the agreement entitled the defendant to plead guilty to a misdemeanor. Because the State elected not to reduce the charge, the court dismissed the charge in the information with prejudice. We conclude that under the "Plea Agreement," the State agreed to reduce the charge to a misdemeanor if the defendant cooperated, and that the trial court was not clearly wrong when it determined that she did cooperate to her detriment. Therefore, we affirm the judgment of the district court.

I. STATEMENT OF FACTS
On May 4, 1991, Howe, the a 19-year-old resident of Seward, Nebraska, allegedly violated § 28-416(1)(a) by selling marijuana to a confidential informant and an undercover State Patrol trooper. She was not aware that the State observed the alleged offense. Approximately 5 months later, a Seward County deputy sheriff stopped Howe on the street and told her to come to the sheriff's office on October 11 to talk to deputies there. At the sheriff's office, Howe was not told that she was under arrest, but that there was a warrant for her arrest for the May 4 offense. She was given a typed document entitled "Plea Agreement" and was told by the deputies that she could either sign the agreement or go to jail that night. Before Howe left, she, the county attorney, and a Seward County deputy sheriff signed the agreement.
Under the agreement, the State agreed to accept a guilty plea to attempted delivery of a controlled substance, a Class IV felony, rather than delivery of a controlled substance, a Class III felony, and Howe agreed to plead guilty to the lesser charge.
The agreement goes on to provide:
The State shall consider a misdemeanor charge based on the level of cooperation of said STACEY [sic] L. HOWE or as set forth in Paragraph # 15, and our office will file no other criminal charges against him/ her based upon information now in our possession or information later provided by him/her under the conditions set forth below.
The agreement contains no paragraph No. 15. The remainder of the four-page, single-spaced document contains a redundant list of various acts Howe agreed to perform for the State in order to cooperate in the investigation of drug and drug-related activity in Seward County, such as provide truthful information and testimony, provide relevant documents concerning criminal investigations, take a polygraph examination, refrain from violating any law, and "engage in and conduct other activities as directed by the agents in charge of the investigation." The State agreed not to use any information provided by Howe against her and agreed to advise the sentencing court of any assistance she provided under the agreement.
The agreement then states:
The State of Nebraska and/or United States agrees to consider the totality of the circumstances, including but not limited to the following factors in determining whether, in the assessment of the Seward County Attorney, STACEY [sic] L. HOWE has provided substantial assistance which would merit a government reduction from a felony to a misdemeanor.
(A) The government's evaluation of the significance and usefulness of any assistance rendered by [STACY] L. HOWE.
(B) The truthfulness, completeness, and reliability or any information or testimony provided by [STACY] L. HOWE.
(C) The nature and extent of [STACY] L. HOWE'S assistance.
(D) Any injuries suffered or any danger or risk of injury to [STACY] L. HOWE or his/her family resulting from any assistance provided by him/her.

*360 (E) The timeliness of any assistance provided by [STACY] L. HOWE.
Howe signed the agreement without benefit of counsel that night. She then gave the State Patrol a list of suspected drug dealers, and she attempted to set up controlled buys. She placed 20 phone calls to the State Patrol during late 1991 and early 1992, and on two occasions in January 1992, at the direction of the State Patrol, she purchased marijuana from different suspects while law enforcement officers had the purchase under surveillance. Howe was required to wear a "wire" and to be strip searched before and after the transactions. Howe testified at the trial of one of the sellers, and he was convicted. The record reflects that the second seller was arrested on the basis of Howe's purchase of marijuana, that Howe was subpoenaed to testify at his trial, and that the trial was set for May 10, 1993.
A few days after she made the drug buys for the State Patrol, it asked her to again buy drugs from the same sellers. Howe expressed reluctance to do so, because the sellers were reluctant to sell to her the first time. Howe testified that she thought another purchase so close in time would raise the sellers' suspicions. The trooper in charge had her sign some documents and then told her that her assistance was no longer desired. On September 4, 1992, Howe was charged with a Class III felony for the alleged offense of May 4, 1991.
Howe moved the court to enforce the agreement by requiring the county attorney to reduce the charge to a misdemeanor and to accept a plea of guilty to a misdemeanor charge. The State resisted this motion, and the court held an evidentiary hearing. The district court held that the agreement was ambiguous and should be interpreted against the State, that the State was bound by the agreement, and that Howe had substantially performed it and was entitled to its benefit; that is, she was entitled to plead guilty to a lesser-included offense, a misdemeanor, rather than a Class III felony. The State then refused to reduce the charges as ordered and suggested to the court that the charges be dismissed so that the State could appeal. The district court then dismissed the charges against Howe with prejudice, and the State appealed under Neb.Rev.Stat. §§ 29-2315.01 to 29-2316 (Reissue 1989 & Cum.Supp.1992).

II. ASSIGNMENTS OF ERROR
The State alleges the trial court erred when it (1) did not summarily dismiss the defendant's motion, (2) accepted jurisdiction to hear the defendant's motion, (3) heard evidence relating to sentencing prior to the entry of a plea of guilty, (4) found that the defendant substantially performed the agreement and was entitled to enter a guilty plea to a misdemeanor, (5) required the State to file a misdemeanor charge to permit the defendant's plea thereto, and (6) dismissed the State's information with prejudice upon the failure of the State to reduce the charge against the defendant to a misdemeanor.
The issues presented in this appeal have not been directly addressed by the Nebraska Supreme Court. The errors assigned by the State raise numerous points, but in our view, they do not present the issues in a manner that will aid our analysis and discussion. Therefore, we consider the errors assigned by the State, but we have reorganized the issues into what we believe to be a more helpful format. Therefore, the issues we consider and decide in this opinion are: (1) Is the agreement between the State and the defendant enforceable? (2) May a court enforce a valid cooperation agreement by dismissing an information? (3) What is the meaning of the defendant's agreement with the prosecution? (4) Is the prosecution the final judge of whether the defendant cooperated? and (5) Are the district court's factual findings supported by the evidence?

III. STANDARD OF REVIEW
On questions of law, an appellate court is obliged to reach a conclusion independent of the decision reached by the trial court. State ex rel. Grams v. Beach, 243 Neb. 126, 498 N.W.2d 83 (1993); Howard v. City of Lincoln, 243 Neb. 5, 497 N.W.2d 53 (1993).


*361 IV. ANALYSIS

1. IS THE AGREEMENT BETWEEN THE STATE AND HOWE ENFORCEABLE?
The State argues that the defendant has not yet entered a plea, and therefore the appropriate remedy available to her is to enter a not-guilty plea to the indictment. In its brief, and at oral argument, the State contended that a defendant can only rely upon the government's promise, and thereby only enforce such an agreement, after a defendant has entered his or her plea of guilty. The State cites Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971); Mabry v. Johnson, 467 U.S. 504, 104 S.Ct. 2543, 81 L.Ed.2d 437 (1984); and People v. Navarrolli, 121 Ill.2d 516, 118 Ill.Dec. 414, 521 N.E.2d 891 (1988). These cases involved pure plea agreements, and they are not applicable because the agreement between the State and Howe was not a plea agreement.
The discussions contained in the cases we have consulted show that there is a difference between a plea bargain, a statutory immunity agreement, and other bargains that are neither plea bargains nor statutory immunity agreements. State v. Copple, 224 Neb. 672, 401 N.W.2d 141 (1987). In this case, we are dealing with a bargain which does not involve a plea and which is not a statutory immunity agreement. As the Copple court stated:
"We should meticulously keep separate and apart the subjects of (1) the conferral of immunity, (2) a plea bargain, and (3) some other bargain involving something other than a plea to a criminal charge. The sources of authority are different. The social purposes are different. The legal incidents are different. The procedural rules are different. Other than the very general notion of some `quid pro quo,' the three phenomena are distinct. We only do the law a disservice when we heedlessly blur those distinctions."
Id. at 687, 401 N.W.2d at 153 (quoting Butler v. State, 55 Md.App. 409, 462 A.2d 1230 (1983)).
Pure plea bargain agreements "involve a suspect who has been apprehended for allegedly committing a crime and, rather than face the prospects of an extended trial and a punishment of undetermined severity if convicted, decides to plead guilty to charges mutually acceptable to him and the prosecutor." United States v. Minnesota Min. & Mfg. Co., 551 F.2d 1106, 1111-12 (8th Cir. 1977).
In Butler v. State, supra, quoted in Copple, the Maryland court defined the statutory immunity agreement as follows:
Immunity with a capital "I" is legislatively authorized, legally cognizable, and judicially enforceable.... Immunity is exclusively a creation of statute and can only exist when a statute has brought it into being....
....
Formal immunity is dramatically distinguished from informal agreements that "partake of," "sound in," or somehow resemble formal immunity. Formal immunity is not necessarily the subject of a bargain and is frequently forced upon a reluctant witness against that witness's will....
Formal immunity, moreover, is never given in exchange for (1) cooperation, (2) information, or (3) even non-privileged testimony. The very notion of immunity has no existence outside the context of the constitutional privilege against compelled testimonial self-incrimination. It is the "flipside" of the privilege.... Although a quid pro quo of forbearing to prosecute in exchange for anything other than privileged testimony may resemble... immunity, it is not immunity.
55 Md.App. at 418-22, 462 A.2d at 1234-36.
In Copple, the court found that Copple was not granted statutory immunity, but that he voluntarily bargained for immunity with the government. The agreement in Copple was neither a plea bargain nor a statutory immunity agreement, but the Supreme Court said that the absence of statutorily granted immunity "does not mean that the State is exempt from compliance with its agreement regarding immunity and restricted evidence or information." 224 Neb. at 688, 401 N.W.2d at 153. In support of its conclusion in Copple, *362 the Supreme Court quoted Rowe v. Griffin, 676 F.2d 524, 527-28 (11th Cir.1982):
We believe that, as a matter of fair conduct, the government ought to be required to honor such an agreement when it appears from the record that: (1) an agreement was made; (2) the defendant has performed on his side; and (3) the subsequent prosecution is directly related to offenses in which the defendant, pursuant to the agreement, either assisted with the investigation or testified for the government.
It also quoted United States v. Carpenter, 611 F.Supp. 768, 774-75 (N.D.Ga.1985):
However, the courts have developed a concept of "nonstatutory" immunity whereby the courts will enforce informal or procedurally flawed grants of immunity on equitable grounds.... These cases indicate that where the government has entered into an agreement with a prospective defendant and the defendant has acted to his detriment or prejudice in reliance upon the agreement, "as a matter of fair conduct, the government ought to be required to honor such an agreement."
(Citing Rowe v. Griffin, supra.)
In Copple, the State had made an agreement that is analogous to the agreement in this case; that is, the State agreed to limit its rights in prosecuting the defendant. The State's agreement in this case belongs in the third category cited in Copple, that is, a bargain which involves something other than statutory immunity or a pure plea bargain. The cases we have found in this category are cases where the prosecutor agreed to limit prosecution in some manner in consideration for the defendant's cooperating in some manner. This is the nature of the agreement in this case, and for lack of a better name, we will call it a cooperation agreement.
Other courts have addressed the enforceability of cooperation agreements. In United States v. Minnesota Min. & Mfg. Co., 551 F.2d 1106 (8th Cir.1977), the "Watergate Special Prosecutor's Force" and Minnesota Mining & Manufacturing Co. (3M) agreed that 3M and its chief executive officer would each plead guilty to a misdemeanor campaign contribution violation and would continue to cooperate with the investigation of illegal campaign contributions. Consequently, 3M pled guilty and cooperated. Later, the prosecution obtained an indictment against 3M for criminal tax violations. The federal district court found that 3M had "`acted in reliance upon the agreement to their detriment in performing the conditions required by the government.'" Id. at 1111. Therefore, the district court dismissed the case, and the Eighth Circuit affirmed its judgment.
In State v. Lummus, 449 N.W.2d 95 (Iowa App.1989), the defendant and two other men had stolen a van. The prosecutor agreed to dismiss the charges against the defendant in return for his agreement to give information to the prosecutor and testify against his codefendants. The prosecutor used Lummus' promise to testify to negotiate guilty pleas from the codefendants. The prosecutor then charged Lummus with first degree theft. The Lummus court held that the defendant's detrimental reliance prohibited further prosecution and said:
[T]he prosecution had used Lummus's information and agreement to testify to negotiate pleas from the other two codefendants. By using this agreement and information as leverage, the prosecutor was able to nullify the need for a plea agreement with Lummus.... [T]he crucial test of detriment or prejudice is whether the defendant has suffered harm from reliance on the plea bargain. What greater harm could a defendant incur than to provide information which is ultimately used to eliminate the need for the State's plea arrangement with him?
Id. at 100.
We conclude that cooperation agreements are enforceable on equitable grounds if (1) the agreement was made; (2) the defendant has performed whatever the defendant promised to perform; and (3) in performing, the defendant acted to his or her detriment or prejudice. See, State v. Copple, 224 Neb. 672, 401 N.W.2d 141 (1987); State ex rel. Fortner v. Urbom, 211 Neb. 309, 318 N.W.2d 286 (1982).


*363 2. MAY A COURT ENFORCE A VALID COOPERATION AGREEMENT BY DISMISSING AN INFORMATION?
In State ex rel. Fortner, a prosecutor agreed to reduce several felony charges to a single misdemeanor. The State later refused to abide by that agreement, and the defendant brought a mandamus action against replacement prosecutors to compel them to carry out the agreement. The Supreme Court affirmed the denial of the writ of mandamus. In so doing, that court observed that a writ of mandamus should not be issued where there is another plain and adequate remedy available and said:
[The defendant] had another plain and adequate remedy by way of a motion requesting the District Court to enforce the agreement or dismiss the felony proceedings. See State v. Thompson, 48 Md.App. 219, 426 A.2d 14 (1981). Therefore, in our opinion, mandamus was not a proper remedy in this instance.
211 Neb. at 311-12, 318 N.W.2d at 287.
The State ex rel. Fortner court held that Fortner was also not entitled to relief because he did not show that he detrimentally relied on the original prosecutor's promises in the agreement. State ex rel. Fortner, therefore, clearly indicates that if there was detrimental reliance upon the State's promises in an agreement with the State, the remedy of dismissal is available.
Federal courts have held that dismissal of an indictment is an appropriate remedy when the state fails to perform under an agreement with a defendant. See, Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971) (remedy best left to discretion of trial court); U.S. v. Johnson, 861 F.2d 510 (8th Cir.1988) (dismissal of indictment appropriate under certain circumstances); United States v. Brown, 801 F.2d 352 (8th Cir.1986) (trial court may enforce the agreement by dismissing the indictment); United States v. Minnesota Min. & Mfg. Co., 551 F.2d 1106 (8th Cir.1977) (remedy for breach of prosecutor's promise rests in the discretion of the trial court; dismissal of indictment not abuse of discretion).
We conclude that State ex rel. Fortner and the general authority from the federal cases cited above support the proposition that in the proper case, the district court may enforce a cooperation agreement by dismissing charges against the defendant if the State refuses to comply with its agreement to lower or dismiss such charges.

3. WHAT IS THE MEANING OF THE DEFENDANT'S AGREEMENT WITH THE PROSECUTION?
Courts have frequently looked to contract law analogies in determining the rights of defendants aggrieved in the plea negotiation process. United States v. Calabrese, 645 F.2d 1379 (10th Cir.1981). Cooperation agreements are contractual in nature and subject to contract law standards. U.S. v. Johnson, supra. A cooperation agreement is "somewhat analogous to a plea agreement except that the former is a `prosecutorial agreement, the unviolability [sic] of which rested completely in the province of the government prosecutors, who have the sole power and responsibility to institute criminal proceedings.'" Id. at 512 (quoting United States v. Minnesota Min. & Mfg. Co., supra).
The construction of a contract, if needed, is a question of law for the court. Artex, Inc. v. Omaha Edible Oils, Inc., 231 Neb. 281, 436 N.W.2d 146 (1989). In construing a contract, the court will apply the general rule that when there is a question as to the meaning of the language of a contract, the contract will be construed against the party preparing it. Id. In the context of plea agreements, the government "must bear the burden for any lack of clarity in the agreement and ambiguities should be resolved in favor of the defendant." Innes v. Dalsheim, 864 F.2d 974, 979 (2d Cir.1988). See, United States v. Harvey, 791 F.2d 294 (4th Cir.1986); United States v. Fields, 766 F.2d 1161 (7th Cir.1985).
Even under the strict rules of contract construction and interpretation, the agreement can be considered ambiguous. "`Ambiguity exists in an instrument when a word, phrase, or provision in the instrument has, or is susceptible of, at least two reasonable but conflicting interpretations or meanings.'" *364 Dammann v. Litty, 234 Neb. 664, 670, 452 N.W.2d 522, 527 (1990). "Whether a document is ambiguous is a question of law initially determined by a trial court." Knox v. Cook, 233 Neb. 387, 391, 446 N.W.2d 1, 4 (1989). "`Regarding a question of law, an appellate court has an obligation to reach a conclusion independent from a trial court's conclusion in a judgment under review.'" Dammann v. Litty, 234 Neb. at 671, 452 N.W.2d at 527. "When a court has determined that ambiguity exists in a document, an interpretative meaning for the ambiguous word, phrase, or provision in the document is a question of fact for the fact finder." Id.
The State argues that the agreement provides that the State would reduce the Class III felony to a Class IV felony and allow Howe to plead guilty to the Class IV felony in exchange for her performing the acts of cooperation enumerated in the instrument. The only language which could be so interpreted is the first sentence of the first paragraph, which states that "[o]n the understanding specified below, the State of Nebraska will accept" a guilty plea to a Class IV felony rather than to a Class III felony. However, adoption of the State's interpretation of the agreement's provisions results in an absurdity. Under the State's interpretation, to be allowed to plead guilty to a Class IV felony, Howe must plead to a Class IV felony and give cooperation, then, if she gives cooperation above and beyond that stated in the agreement, the State would consider reducing a charge to which Howe has already pled. Only the words "[o]n the understanding specified below" could possibly be interpreted as providing that the State agreed to lower the charges to a Class IV felony in consideration for a guilty plea to a Class IV felony and cooperation. If the drafter of the document intended that effect, it would have been easy to have said so. In our view, the agreement could not be interpreted as contended by the State, that is, as an agreement to cooperate in consideration for lowering the charge to a Class IV felony.
The provisions regarding Howe's cooperation are not clear. Howe agreed to fully cooperate with law enforcement officials in their "investigation into the use, possession, and trafficking of controlled substances and related activity within Seward County, Nebraska." The provisions then list acts Howe must perform. This list is so unlimited in time or scope, and so clearly is without unambiguous consideration, that a good argument could be made that its enforcement would violate U.S. Const., amend. XIII, § 1 (prohibiting slavery). The State only implies a promise to lower the charges to a misdemeanor. In one paragraph, the agreement provides: "The State shall consider a misdemeanor charge based on the level of cooperation of [the defendant]." In another paragraph, the agreement provides: "The State... agrees to consider the totality of the circumstances ... in determining whether [Howe] has provided substantial assistance which would merit a government reduction from a felony to a misdemeanor."
The agreement states that reduction of charges against Howe to a misdemeanor would be based on Howe's level of cooperation or as set forth in paragraph No. 15, but the document does not have a paragraph No. 15. In paragraph No. 3, the agreement does set forth a provision that Howe must fully and completely cooperate with law enforcement officials, and it specifies what constitutes cooperation in paragraph No. 3's subparagraphs.
Even under strict contract construction rules, we find that the district court correctly held that the agreement was ambiguous regarding the State's promises or consideration for Howe's cooperation and the type of cooperation required to warrant reduction of the charge against Howe to a misdemeanor. The provisions in the agreement regarding the State's promises and the performance required of Howe can be interpreted to have more than one meaning. Because the State bears the burden of the lack of clarity within the agreement, any ambiguity within the agreement must be interpreted in favor of the defendant.
Regardless of the ambiguity of the agreement's provisions, we note that courts have held that while contract principles are helpful in interpreting an agreement, there are inherent limits to the contract analogy. U.S. v. Olesen, 920 F.2d 538 (8th Cir.1990). *365 "`A plea bargain is a contract, the terms of which necessarily must be interpreted in light of the parties' reasonable expectations. The resolution of each case depends upon the essence of the particular agreement and the Government's conduct relating to its obligations in that case.'" United States v. Fields, 766 F.2d 1161, 1168 (7th Cir.1985). Furthermore, "[p]lea agreements are like contracts; however, they are not contracts, and therefore, contract doctrines do not always apply to them." (Emphasis omitted.) United States v. Olesen, 920 F.2d at 541.
In reality, what the court is looking for is that the prosecution treat persons accused of crimes fairly and equitably and that the prosecution not take abusive advantage of them. We find that under the agreement, a person in Howe's position would have a reasonable expectation that if she cooperated with the State, the charge would be reduced to a misdemeanor.

4. IS THE PROSECUTION THE FINAL JUDGE OF WHETHER THE DEFENDANT COOPERATED?
The State argues that the State and Trooper Jud McKinstry, a nonparty to the agreement, are empowered to decide whether Howe cooperated. We do not agree. The federal courts have found that the government is not free to unilaterally decide whether there has been a breach of a plea agreement by a defendant and then withdraw the agreement. See, U.S. v. Johnson, 861 F.2d 510 (8th Cir.1988); United States v. Calabrese, 645 F.2d 1379 (10th Cir.1981). As a result, the trial court must hold an evidentiary hearing to determine whether there was a breach of a cooperation agreement. United States v. Brown, 801 F.2d 352 (8th Cir.1986).
In Johnson, the defendant was arrested for distributing and possessing with intent to distribute a controlled substance. After her arrest, negotiations began regarding her cooperation in an ongoing drug investigation. The terms of the agreement were that the defendant would provide information regarding her knowledge of drug sales and theft of drugs, in exchange for which the federal government would not prosecute her. The federal government claimed that the defendant had failed to carry out her part of the bargain, and therefore it indicted her for the original charges. The Johnson court stated:
We are somewhat disturbed by the ability of the government to make a post hoc determination of what constitutes sufficient cooperation. At oral argument, counsel for the government stated that the appropriateness of specific performance depended on the extent to which a defendant cooperated with law enforcement officers. Not only would this standard allow the government to unilaterally render a cooperation agreement void but it would also create an incentive for defendants to conveniently add to their stories to satisfy their end of the bargain. Thus, when fashioning a remedy, the amount of information provided to police is irrelevant.
861 F.2d at 513 n. 3.
The trooper in charge of Howe, McKinstry, who was not a party to the agreement, testified at the hearing on the agreement that while he agreed that Howe had provided assistance to law enforcement officials, he did not consider her assistance substantial. When asked what he considered substantial, McKinstry testified:
It is my opinion of substantial assistance both with the experience with Ms. Howe and experience from controlling other informants in my career with the narcotics division, would be a very high level of cooperation and assistance.... That level of assistance would include ... providing myself with information ... to attempt to generate cases on, which Ms. Howe did.... Further cooperation would be on a high level of communications between myself and the informant as far as attempting on their own to generate investigations that we could actively pursue without being told to pursue ... a certain individual for an investigation.
Like the court in Johnson, we too are disturbed by the notion that the government could determine how long Howe was supposed to cooperate and how many investigations she was supposed to take part in and that if it deemed it wanted more out of her, it could unilaterally declare a breach of the agreement and file charges against her. Under *366 the government's argument, 19-year-old Howe could be subject to a kind of indentured servitude, in which she would be compelled to continue to cooperate, or the government would file an information against her. Unlike Howe's situation, however, indentured servitude traditionally lasted only for an express and fixed number of years. Howe was told she must agree to the agreement's terms, without benefit of counsel, or go to jail. Equally disturbing is Trooper McKinstry's assertion that for the State to find sufficient cooperation, Howe must show a "high level" of cooperation and generate investigations on her own which the State Patrol could then pursue. Nowhere in the agreement does it say that Howe must act as an investigator for the State Patrol, developing cases which it may then pursue, nor is this a reasonable interpretation of the agreement.
We determine that the district court, and not the State, was required to determine whether the defendant had cooperated in accordance with the agreement and was required to hold an evidentiary hearing on the matter.

5. ARE THE DISTRICT COURT'S FACTUAL FINDINGS SUPPORTED BY THE EVIDENCE?
"[O]nce the government acknowledges the existence of an agreement, the government has the burden of establishing a breach by the defendant if the agreement is to be considered unenforceable." United States v. Calabrese, 645 F.2d 1379, 1390 (10th Cir.1981). The burden of proof regarding whether Howe complied with the terms of the cooperation agreement, or whether she breached such terms, lies with the State. We also believe the district court was required to determine whether the defendant acted to her detriment or prejudice.

(a) Howe's Compliance with the Terms of the Agreement
In State v. Copple, 224 Neb. 672, 689, 401 N.W.2d 141, 154 (1987), the court found that at a motion-to-suppress hearing regarding statements Copple gave to the State pursuant to an informal immunity agreement, the "district court properly considered the question whether the State had violated its agreement with Copple concerning immunity and restricted evidence." The court held that the proper standard of review of the district court's factfinding ruling on a motion to suppress is that "the Supreme Court will uphold the trial court's findings of fact unless those findings are clearly erroneous." Id. In the context of review of a district court's dismissal for failure to provide a speedy trial, the Supreme Court has held that "a determination made by the trial court as to whether a complaint should be dismissed because of the failure of the State to provide the defendant with a speedy trial is a factual question which will be affirmed by the appellate court unless such was clearly erroneous." State v. Richter, 240 Neb. 223, 224, 481 N.W.2d 200, 203 (1992). From Copple and Richter, we conclude the district court's findings of fact that a defendant Complied with a cooperation agreement and that the defendant detrimentally relied upon that agreement should be upheld unless the findings are clearly erroneous.
The agreement did not specifically provide for Howe's participating in controlled buys. She did participate in two controlled buys, wore a wire, and was strip searched before and after the buys. We realize that this procedure is ordinary and even necessary to build a sound case against the suspected drug dealer. However, from the standpoint of the young woman cooperating with the police, this procedure has to be humiliating and frightening. Her activity resulted in at least one conviction.
Finally, the court found that there was no provision regarding how long Howe was supposed to cooperate and held that in the absence of a provision for the length of performance, a reasonable time will be presumed. Gustav Theiszen Irr. Co., Inc. v. Meinberg, 202 Neb. 666, 276 N.W.2d 664 (1979). This principle of contract law is helpful in the analysis of the agreement. We find that the district court's factual finding that Howe substantially fulfilled the performance requirements under the agreement was not clearly erroneous, and we therefore uphold the district court's finding.


*367 (b) Howe's Alleged Breach of the Agreement
The government claims that regardless of whether Howe performed, she breached the agreement by telling her brother and her boyfriend that she had been acting as a confidential informant for the State. The record does not suggest how the State was damaged by Howe's disclosure. Nowhere in the agreement does it state that Howe would not be allowed to tell anyone of her activities. We find that the State failed to meet its burden to show a breach of the agreement, nor did it show it was damaged by the alleged breach.

(c) Howe's Detrimental Reliance Upon the Agreement
In State ex rel. Fortner v. Urbom, 211 Neb. 309, 318 N.W.2d 286 (1982), the court found that Fortner was not entitled to enforce an agreement he had with a prosecutor because he had suffered no detriment or prejudice. The court held that Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971), could not be applied to Fortner's case because in Santobello, "the defendant had pleaded guilty, had changed positions to his detriment, and was then denied the `benefit of his bargain.'" 211 Neb. at 312, 318 N.W.2d at 287. In State ex rel. Fortner, the court stated that all of the cases cited by Fortner involved detrimental reliance and mentioned as detrimental reliance a plea of guilty, furnishing evidence of criminal activity, self-incrimination, and undercover work. One of the reasons the defendant lost in State ex rel. Fortner was that Fortner could not demonstrate any detrimental reliance. The court in State ex rel. Fortner therefore recognized other acts giving rise to detrimental reliance besides a plea of guilty. In State ex rel. Fortner, the court recognized detrimental reliance as providing information of criminal activity to law enforcement officials, providing self-incriminating information, and performing undercover work. In this case, the district court found that Howe provided information of criminal activity to law enforcement officials and that she performed undercover work, facts which the State does not dispute. As a result, there are sufficient facts to show that Howe detrimentally relied on the State's promise to reduce the charge against her to a misdemeanor.

V. CONCLUSION
The district court correctly held that the agreement between Howe and the State was ambiguous and should be construed against the State. Howe had a right to reasonably expect that if she substantially complied with the agreement, the State would reduce the charges to a misdemeanor. There is sufficient evidence to support the district court's finding that Howe complied with and substantially performed under the agreement and its finding that Howe performed certain acts which have been held to give rise to detrimental reliance. We cannot say that the district court's findings are clearly wrong. We find that the cooperation agreement between the State and Howe was enforceable, and as the State refused to perform an act required of it under the agreement, the proper remedy was for the court to dismiss the charge. We therefore affirm.
AFFIRMED.
