¶ 1. The petitioner, Harris Byers, seeks review of a decision of the court of appeals1 affirming a judgment and order committing him pursuant to Wis. Stat. Chapter 980 (1997-98) to a secure mental health facility as a sexually violent person.2 Byers asserts that a district attorney lacks authority to file a Chapter 980 petition unless the agency with jurisdiction has first requested the filing of a petition and the Department of Justice (DOJ) has declined. We agree and conclude that a request from the agency with jurisdiction and a subsequent decision by the DOJ not to file are prerequisites to a district attorney's authority to file a Chapter 980 petition. Accordingly, we reverse the court of appeals and remand the matter to the circuit court for dismissal of the petition.
H-H
¶ 2. Prior to Byers'release on parole in January of 1995, the Department of Corrections (DOC) evaluated Byers to determine his status under the sexually violent person commitment provisions of Chapter 980, Wisconsin Statutes. The doctor who performed the evaluation concluded that Byers did not meet the criteria for referral under Chapter 980. Another evaluation, conducted by a second doctor, took place in August of 1998 after Byers was revoked from parole and shortly before *116his scheduled release date. This evaluation also concluded that Byers was not eligible for commitment. Consequently, the DOC did not request that a Chapter 980 petition be filed against Byers.
¶ 3. The DOC notified the Brown County district attorney that Byers intended to reside in Brown County after his release. The Brown County district attorney arranged for an independent evaluation of Byers by Dr. Raymond M. Wood. Dr. Wood opined that Byers met the criteria for a Chapter 980 proceeding. Based on this determination and the fact that Byers had been convicted for a "sexually violent offense," the Brown County district attorney concluded that Byers came within Chapter 980's definition of "sexually violent person."3 The district attorney filed a Chapter 980 petition against Byers prior to his release date and requested a jury trial.
¶ 4. Byers moved to dismiss the petition claiming that the Brown County district attorney did not have the authority to file the Chapter 980 petition without the DOC requesting that such a petition be filed. He argued that the statutory scheme contemplated that the district attorney would not have authority unless the agency with jurisdiction requested the DOJ to file a petition and the DOJ declined to do so.
*117¶ 5. The circuit court concluded that the Brown County district attorney could file the petition even though there was no DOC request and subsequent decision by the DOJ declining to file. It noted that while the authority of the DOJ to file a Chapter 980 petition is conditioned upon a request from the agency with jurisdiction, there is no such condition on the authority of a district attorney.
¶ 6. Byers filed an interlocutory appeal contesting the circuit court's interpretation. The court of appeals denied review.
¶ 7. A jury trial commenced on the issue of whether Byers was a sexually violent person. On the second day of the trial, Byers agreed that he would admit that he was a sexually violent person in exchange for the district attorney's agreement not to oppose his request for conditional release.
¶ 8. At the dispositional hearing, the State did not oppose Byers' request for conditional release, but it also did not join the request. The court determined that institutional care was appropriate and ordered Byers committed to the Wisconsin Resource Center.
¶ 9. Byers appealed the circuit court's judgment and order for commitment. The court of appeals granted Byers' motion requesting remand to the circuit court for a hearing on the effectiveness of his trial counsel. He then filed a post-commitment motion with the circuit court asserting that his trial counsel was ineffective in connection with preserving for appeal the issue of the district attorney's authority. Based on testimony presented, the circuit court found that Byers' trial counsel advised him that this issue would be preserved despite Byers' admission and waiver of rights. The circuit court also found that Byers relied on this *118advice and that he would not have made the admission if he had not been so advised.
¶ 10. The circuit court further found that the advice of the trial counsel was erroneous because, at the very least, the law is unclear regarding whether Byers could pursue the issue on appeal. Nevertheless, the circuit court concluded that Byers did not suffer any prejudice by the erroneous advice because it was satisfied that, even if the issue had been preserved, Byers would not have prevailed. The circuit court noted that § 980.02(1) was "poorly worded" but concluded that Byers would not have prevailed because the statute did not limit the authority of the district attorney to cases where the agency with jurisdiction has first made a request of the DOJ. The circuit court therefore denied Byers' post-commitment motion and Byers appealed this decision.
¶ 11. The court of appeals consolidated the appeals and addressed the issue of the Brown County district attorney's authority. It concluded that § 980.02(1) did not prevent the district attorney from filing the Chapter 980 petition against Byers. The court then rejected Byers' claims of ineffectiveness of counsel and the absence of a knowing and voluntary plea. It reasoned that these claims were based on Byers' ability to obtain appellate review of the issue of the district attorney's authority and the court of appeals had now addressed the issue. Accordingly, his ineffectiveness of counsel claim failed because there was no prejudice and his knowing and voluntary plea claim failed because any error was harmless since the court of appeals addressed the issue he sought to preserve. Therefore, the court of appeals affirmed the judgment and orders of the circuit court.
*119¶ 12. This case provides us with an opportunity to examine the limits of a district attorney's authority to file a petition alleging that a person is subject to involuntary commitment under Chapter 980 as a sexually violent person. Specifically, we must resolve whether, under Wis. Stat. § 980.02(1), a district attorney may file a Chapter 980 petition only if the agency with jurisdiction has first requested the filing of a petition and the DOJ has declined to file.4 The resolution of this issue is a matter of statutory interpretation which presents a question of law subject to independent appellate review. State v. Setagord, 211 Wis. 2d 397, 405-06, 565 N.W.2d 506 (1997).
¶ 13. The goal of statutory interpretation is to discern the intent of the legislature. Id. at 406. We first analyze the language of Wis. Stat. § 980.02(1) to determine whether the legislature intended that a district attorney have authority to file only if the DOJ has declined to do so following a request by the agency with jurisdiction. We next examine the statute's legislative history, its purpose, and the policy reasons supporting the conclusion that the legislature intended to create a *120significant gatekeeper role for the agency with jurisdiction. Finally, based on our analysis, we determine that the intent of the legislature in enacting § 980.02(1) was to require that there be a request of the agency with jurisdiction followed by a DOJ decision not to file before a district attorney has authority to file a Chapter 980 petition.
I — I HH HH
¶ 14. Chapter 980 creates an involuntary civil commitment procedure that is intended primarily to provide treatment for sexually violent persons and to protect the public. State v. Carpenter, 197 Wis. 2d 252, 258-259, 541 N.W.2d 105 (1995). Under Chapter 980, when a person who may meet the criteria for commitment as a sexually violent person is nearing release from confinement, the agency that will release the person (the "agency with jurisdiction")5 is required to notify the DOJ and the appropriate district attorneys.6 The appropriate district attorneys are the district at*121torney for the county in which the proceeding occurred that resulted in the person's confinement and the district attorney of the county in which the person will reside upon release. In re Commitment of Goodson, 199 Wis. 2d 426, 437, 544 N.W.2d 611 (Ct. App. 1996).
¶ 15. The notice from the agency with jurisdiction must contain specified information including the person's offense history and documentation regarding any treatment.7 The notice must be sent as soon as possible beginning three months prior to the person's release.
¶ 16. Under § 980.02(1), the authority to file a Chapter 980 petition is limited to the DOJ and the appropriate district attorneys. The language of § 980.02(1) provides as follows:
980.02 Sexually violent person petition; contents; filing. (1) A petition alleging that a person is a sexually violent person may be filed by one of the following:
(a) The department of justice at the request of the agency with jurisdiction, as defined in s. 980.015(1), *122over the person. If the department of justice decides to file a petition under this paragraph, it shall file the petition before the date of the release or discharge of the person.
(b) If the department of justice does not file a petition under par. (a), the district attorney for one of the following:
1. The county in which the person was convicted of a sexually violent offense, adjudicated delinquent for a sexually violent offense or found not guilty of or not responsible for a sexuality violent offense by reason of insanity or mental disease, defect or illness.
2. The county in which the person will reside or be placed upon his or her discharge from a sentence, release on parole or extended supervision, or release from imprisonment, from a secured correctional facility, as defined in s. 938.02(15m), or a secured child caring institution, as defined in s. 938.02(15g), or from a commitment order.
(Emphasis added.) The parties agree that the agency with jurisdiction in this case is the DOC.
¶ 17. Byers argues that a request by the agency with jurisdiction and the subsequent declination of the DOJ are prerequisites to the district attorney's authority to file a Chapter 980 petition. This narrow interpretation of the district attorney's authority focuses on the introductory clause in par. (b) that states "If the department of justice does not file a petition under par. (a) . . . ." Byers advances that this clause reflects a statutory framework in which the district attorney's authority to file arises only if the DOJ has had the opportunity to file but has elected not to do so.
*123¶ 18. Under this interpretation, if there has been no request by the agency with jurisdiction, the DOJ does not have the opportunity to file a petition. Therefore, in such circumstances, the district attorney's authority is never triggered. Essentially, Byers argues that paragraph (b)'s reference to paragraph (a) incorporates into paragraph (b) the conditions set forth in paragraph (a). Since an agency request is a part of the procedure prescribed in paragraph (a), the request must occur before filing authority can be vested in the district attorney under paragraph (b). Byers maintains that to read the statute otherwise would essentially delete the words "under par. (a)" from the statute.
. ¶ 19. The State counters that an agency request is not a prerequisite to the district attorney's authority to file a Chapter 980 petition. Its broad interpretation of the district attorney's authority focuses on the prefatory clause to paragraphs (a) and (b) that states that a petition may be filed by "one of the following." Paragraph (a) allows the DOJ to file the petition pursuant to an agency request. Paragraph (b) allows a district attorney to file the petition if the DOJ has not filed a petition. The State advances that the only predicate to the authority of the district attorney to file is that a petition has not already been filed by the DOJ. To interpret the statute otherwise would require that the language "at the request of the agency with jurisdiction" be written into paragraph (b).
¶ 20. The reference to paragraph (a), according to the State, is simply a direction as to where the authority of the DOJ originates. It was not intended to incorporate the "at the request of the agency with jurisdiction" language as a limit on the district attorney's authority to file.' The State argues that to read in such an intention ignores that the agency request language *124appears in paragraph (a) but not in paragraph (b) or even in the introductory language to paragraphs (a) and (b).
¶ 21. The language of § 980.02(1) could have more clearly delineated the limits of the district attorney's authority. We agree with the circuit court that the statute is "poorly worded." If the legislature intended Byers' narrow interpretation, it could have repeated the "at the request of the agency with jurisdiction" language directly within paragraph (b). On the other hand, if the legislature intended the State's broad interpretation, it could have omitted the reference to the DO J's ability to file "under par. (a)" from paragraph (b). Thus, we look to the legislative history to assist us in discerning the intent of the legislature.
IV
¶ 22. Chapter 980 was created by 1993 Wis. Act 479. The bill that eventually became Act 479 was Assembly Bill 3 of the 1994 May Special Legislative Session (A.B. 3). As originally introduced, A.B. 3 contained language that granted filing authority to the district attorney without any requirement that there be a request from the agency with jurisdiction. A.B. 3 also granted filing authority to the DOJ, but the DOJ could file only at the request of the district attorney or the agency with jurisdiction.
¶ 23. Initially, the district attorney's filing authority was broader than the DOJ's filing authority. The original language of A.B. 3 read as follows:
980.02 Sexually violent person petition; contents; filing. (1) A petition alleging that a person is a sexually violent person may be filed by one of the following:
(a) The district attorney for the county in which *125the person was convicted of a sexually violent offense, adjudicated delinquent for a sexually violent offense or found not guilty of or not responsible for a sexually violent offense by reason of insanity or mental disease, defect or illness.
(b) The department of justice in any case at the request of a district attorney or the agency with jurisdiction, as defined under s. 980.015(1), over the person. ...
¶ 24. A.B. 3 was amended by Assembly Amendment 2 (AA-2), which changed the above language to substantially what currently exists in § 980.02(1). Thus, the bill as originally introduced would have allowed the district attorney to file absent a request from the agency with jurisdiction. The State would have us interpret the effect of AA-2 as having very little impact on the district attorney's authority, other than granting the authority to two district attorneys instead of one.
¶ 25. However, the placement of the provisions and the legislative history more strongly support the position that the legislature decided to place the district attorney's authority as secondary to the DOJ's authority and to place the agency with jurisdiction as a "gatekeeper" that limits the authority of both the DOJ and the district attorneys.
¶ 26. A review of the placement of the provisions, together with the legislative history, reflects an intent to create a step-by-step process that must be followed before a district attorney has authority to file a petition. Under this step-by-step process, the initial step is that the agency with jurisdiction evaluates the person to be released to determine whether the person may meet the criteria for commitment as a sexually violent person. If *126the agency determines that the person may meet the criteria, the agency requests that the DOJ file a petition. The DOJ can then file a petition or coordinate with one of the appropriate district attorneys regarding filing a petition. Alternatively, the DOJ can determine that a filing is not warranted despite the agency request, in which case one of the appropriate district attorneys can then file the petition on his or her own.
¶ 27. Interpreting AA-2 as changing the district attorney's broad authority to narrow authority is supported by AA-2's change in the placement of the provisions granting authority to the district attorney and the DOJ. As originally drafted, A.B. 3 placed the district attorney's authority first, in paragraph (a). However, AA-2 changed that priority. It instead placed the DOJ in paragraph (a) and the district attorney in paragraph (b), supporting an interpretation that the legislature intented to place the role of the district attorney as secondary to that of the DOJ.
¶ 28. An examination of other legislative history reveals a contemporaneous Legislative Fiscal Bureau memorandum describing the pending bill to members of the legislature. See May 19, 1994 Memorandum to Legislators from Robert Lang. The purpose, in part, of the memorandum was to explain the effect of the very amendment which is the focus of our analysis, and which sets forth a step-by-step process: (1) notice is given of impending release or discharge, (2) the DOJ must first make a determination if it is going to file, and (3) if the DOJ determines that it will not prosecute the petition, then (4) the appropriate district attorney can proceed. The memorandum states:
Amendment 2 ... provide[s] that DOC ... inform (a) the Department of Justice and (b) the District Attorneys of both the county of conviction and the county of *127release (if different) of the anticipated discharge or release of the sexual offender. Require DOJ to make a determination of whether it will prosecute the petition for civil commitment and to notify the appropriate DAs of its decision no less than 30 days prior to discharge or release. . . . Provide that, if DOJ determines it will not prosecute the petition, either the DA of the county of convicion or the DA of the county of release may prosecute the petition (at their own cost).
¶ 29. The drafting instructions also support an interpretation that the legislature intended to place the role of the district attorney as secondary to that of the DOJ. Assembly Amendment 2 (AA-2) was identical to Senate Amendment 2 (SA-2), which was drafted using instructions that were identified in the drafting file as being a part of LRBa4722.8 The instructions provided that "if DOJ refuses, DA can do it. . . (and) DOJ must make decision no later than 30 days b4 release."
¶ 30. Both parties acknowledge that in order for the DOJ to have made a determination of whether it wants to proceed, a referral must be made as a precondition to that determination. Thus, any discussion of a DOJ determination necessarily is premised upon an initial agency referral.
¶ 31. However, the State advances an argument that all that is needed as a precondition for the district attorney to file is that the DOJ has not yet filed. Presumably, under the State's interpretation, even if the DOJ intended to file, but had not yet done so, the district attorney could proceed to file. Under its interpretation, the district attorney need not wait for the DOJ to determine whether it is going to file.
*128¶ 32. AA-2 created Wis. Stat. § 980.02(1)(a) and (b) as they currently exist, along with the requirement that if DOJ decides to file a petition, it must do so no later than 30 days before the date of discharge or release. This 30-day notice requirement, though subsequently vetoed by the governor, illustrates that the State's interpretation is misguided and that the district attorney was to wait for a decision from the DOJ.
¶ 33. The 30-day notice requirement was vetoed by the governor, not because the governor wanted to restore the primary power of the district attorney that AA-2 had taken away, but rather to assist the DOJ. The governor's veto message states that the purpose of the partial veto was to provide the DOJ with more flexibility in filing Chapter 980 petitions. The drafting record for 1993 Wis. Act 479 contains a letter dated May 26, 1994 from the governor to the assembly. The letter states, in part:
Section 40 contains a requirement that the Department of Justice (DOJ) file a petition against a sexually violent person no later than 30 days before the date of release. This does not provide sufficient flexibility for DOJ to petition for releases. Accordingly, I am partially vetoing the provision requiring the filing of a petition no later than 30 days prior to release or discharge.
¶ 34. The State argues that it is incorrect to interpret the district attorney's authority as secondary to the DOJ's authority because other provisions in Chapter 980 grant the district attorney the same or broader authority than the DOJ. We are not persuaded that the provisions cited by the State support an interpretation that would give a district attorney broader filing authority than the DOJ.
¶ 35. The State cites first several provisions of Chapter 980 that grant equal authority to the district *129attorney and the DOJ.9 However, these grants of equal authority simply reflect that, even under the narrow interpretation of the district attorney's authority, there can be circumstances when the district attorney rather than DOJ has properly filed a Chapter 980 petition. In fact, many of these provisions refer to the "district attorney or the department of justice" but then qualify the reference with "whichever is applicable" or "whichever filed the original petition." Therefore, the State's citations regarding the equal authority of the district attorney and the DOJ do not support the conclusion that the district attorney's filing authority must be at least equivalent to the DOJ's authority.
¶ 36. The State also argues that certain provisions of Chapter 980 grant the district attorney broader authority than the DOJ. The State cites two examples. First, the State argues that the listing of two district attorneys (i.e., the county of conviction and the county of intended residence) reflects a broader grant of authority to the district attorneys than to the DOJ. This, however, does not reflect that the authority itself is broad, only that more than one district attorney has the power to exercise the authority that exists.
*130¶ 37. As its second example, the State argues that it appears the district attorney can file a Chapter 980 petition at any time up to 90 days after a person has been released. This position is untenable in that it is contrary to precedent which interprets § 980.02(2)(ag) as requiring that a Chapter 980 petition be filed on or before the date of a person's release or discharge.10 See State v. Thiel, 2000 WI 67,, ¶¶ 30-32, 235 Wis. 2d 823, 612 N.W.2d 94; State v. Thomas, 2000 WI App 162, ¶ 17, 238 Wis. 2d 216, 225, 617 N.W.2d 230; State v. Pharm, 2000 WI App 167, ¶ 15, 238 Wis. 2d 97, 111, 617 N.W.2d 163.
¶ 38. We recognize that the step-by-step process elevates the role of the agency with jurisdiction in determining when a Chapter 980 petition can be filed. There are several policy reasons that support having the agency with jurisdiction serve as such a gatekeeper.
¶ 39. First, the agency with jurisdiction has the person under its supervision, care, and custody. Accordingly, it has the most comprehensive information regarding the person's status under Chapter 980. Second, not only does the agency with jurisdiction have a significant amount of information regarding the person, but it also has a significant amount of knowledge and expertise with supervising and dealing with the type of offenders that are potentially subject to Chapter 980 petitions.
¶ 40. Third, the agency with jurisdiction has the most recent contact with the person, whereas the district attorney of the county of conviction will likely have lost personal contact during the years of confine*131ment. The district attorney of the county of intended residence may have had no prior contact with the person. Fourth, a gatekeeper role for the agency with jurisdiction facilitates creating a consistent and coordinated process for filing Chapter 980 petitions.
¶ 41. Fifth, there is a benefit to having a central screening process to conserve scarce resources because Chapter 980 cases can be complex and can result in significant treatment costs. Sixth, the use of the independent expertise of the agency with jurisdiction can be a tool for ensuring that the decision to file a Chapter 980 petition is insulated from local pressures.
¶ 42. Granted, there is nothing in the legislative history that directly articulates reasons for or against placing the agency with jurisdiction in a gatekeeper role that limits the district attorney's authority. However, the existence of these policy reasons supports the conclusion that such a broad gatekeeper role would be consistent with a legislative intent to create a step-by-step process that enhances the coordinated and efficient operation of Chapter 980.
V
¶ 43. In sum, we conclude that, under § 980.02(1), a request from the agency with jurisdiction and a subsequent decision by the DOJ not to file are prerequisites to a district attorney's authority to file a Chapter 980 petition. Because those prerequisites were not met in this case, we determine that the petition was not properly filed. Accordingly, we reverse the court of appeals and remand the matter to the circuit court for dismissal of the petition.
By the Court. — The decision of the court of appeals is reversed and the cause is remanded.
*132¶ 44. JON E WILCOX, J., did not participate.State v. Byers, Nos. 99-2441 & 00-0454, unpublished slip op. (Wis. Ct. App. January 23, 2001) (affirming a judgment and orders of the circuit court for Brown County, William C. Griesbach, Judge). The court of appeals' decision also affirmed the circuit court's order denying Byers' post-commitment motion.
All references to the Wisconsin Statutes are to the 1997-1998 version unless otherwise indicated.
Wisconsin Stat. § 980.01(7) defines "sexually violent person" as follows:
(7) "Sexually violent person" means a person who has been convicted of a sexually violent offense, has been adjudicated delinquent for a sexually violent offense, or has been found not guilty of or not responsible for a sexually violent offense by reason of insanity or mental disease, defect or illness, and who is dangerous because he or she suffers from a mental disorder that makes it substantially probable that the person will engage in acts of sexual violence.
The court of appeals determined that the circuit court's post-commitment order concluding that Byers suffered no prejudice because the district attorney had authority to file a Chapter 980 petition preserved the authority issue on appeal. This determination is not contested on review in this court.
Additionally, Byers raised two due process issues in his brief. Because we have reversed the court of appeals decision on the issue of the district attorney's authority, we need not address the due process issues.
Wisconsin Stat. § 980.015(1) states that". . . 'agency with jurisdiction' means the agency with the authority or duty to release or discharge the person."
Wisconsin Stat. § 980.015(2) provides as follows:
(2) If an agency with jurisdiction has control or custody over a person who may meet the criteria for commitment as a sexually violent person, the agency with jurisdiction shall inform each appropriate district attorney and the department of justice regarding the person as soon as possible beginning 3 months prior to the applicable date of the following:
(a) The anticipated discharge from a sentence, anticipated release on parole or extended supervision or anticipated release from imprisonment of a person who has been convicted of a sexually violent offense.
*121(b) The anticipated release from a secured correctional facility, as defined in s. 938.02 (15m), or a secured child caring institution, as defined in s. 938.02 (15g), of a person adjudicated delinquent under s. 938.183 or 938.34 on the basis of a sexually violent offense.
(c) The termination or discharge of a person who has been found not guilty of a sexually violent offense by reason of mental disease or defect under s. 971.17.
Wisconsin Stat. § 980.015(3) provides as follows:
(3) The agency with jurisdiction shall provide the district attorney and department of justice with all of the following:
(a) The person's name, identifying factors, anticipated future residence and offense history.
(b) If applicable, documentation of any treatment and the person's adjustment to any institutional placement.
See Drafting Record for Senate Amendment 2, May 1994 Spec. Sess. A.B. 3, in drafting record 1993 Wis. Act 479.
The State cites the following sections that grant equal authority to the district attorney and the DOJ: § 980.015 (notice from the agency with jurisdiction regarding the release); § 980.05(2) (request for jury trial); § 980.08(2) (right to receive petitions by committed individuals for supervised release); § 980.09(l)(a) (right to receive petition for discharge); § 980.09(l)(b) (representing the state in connection with a petition for discharge with DHFS approval); § 980.09(2)(b) (representing the state in connection with a petition for discharge without DHFS approval); and § 980.11(4) (right to receive notice cards from DHFS without charge).
Wisconsin Stat. § 980.02(2)(ag) requires that a Chapter 980 petition allege that the "person is within 90 days of discharge or release, on parole, extended supervision or otherwise, from a sentence .... "