Edward C. Barton received a standard range sentence at the State’s urging despite Mr. Barton’s request for sentencing under RCW 9.94A.660, the special drug offender sentencing alternative (DOSA). The superior court gave two reasons for denying that request. First, Mr. Barton intentionally allowed his residence to be used for manufacturing large amounts of methamphetamine and would not disclose the names of the persons who were involved in that operation. Second, the court believed the community would not be benefited because it viewed postrelease supervision of persons in the DOSA program as inadequate. Mr. Barton appealed, arguing the second rationale violated the separation of powers doctrine. We adhere to the approach to this problem we established in State v. Bramme, 115 Wn. App. 844, 64 P.3d 60 (2003), conclude both reasons are supportable under these facts, and affirm the trial court’s exercise of discretion.
FACTS
On October 11, 2001, Chelan County sheriff deputies lawfully discovered a methamphetamine lab at Mr. Barton’s residence. Mr. Barton claimed the lab was not his, but was run with his permission by other persons he would not name.
The State charged Mr. Barton with five controlled substance violations under chapter 69.50 RCW. In December 2001, Mr. Barton pleaded guilty to three counts — manufacturing methamphetamine, unlawful storage of anhydrous ammonia, and possession of methamphetamine. On Janu*795ary 23, 2002, consistent with the State’s request for a standard range sentence, the superior court sentenced him to concurrent sentences, the longest being 62 months — the low end of his standard range for manufacturing methamphetamine. In sentencing Mr. Barton, the superior court rejected defense counsel’s request that it sentence Mr. Barton to a DOSA under RCW 9.94A.660.
Mr. Barton met the statutory eligibility criteria for a DOSA sentence found in RCW 9.94A.660(1). But under RCW 9.94A.660(2), the superior court must also find that “the offender and the community will benefit from the use of the [sentencing] alternative.”
In support of Mr. Barton’s argument that the court’s reasons violated the separation of powers doctrine, he cites the testimony of Stephen Sype, the community corrections officer who prepared the presentence investigation for Mr. Barton, and the superior court’s comments about Mr. Sype’s testimony about postrelease supervision of DOSA offenders. Mr. Sype testified that on release from total confinement, persons in Mr. Barton’s supervision category would have two contacts per month with a corrections officer and would undergo urinalysis about every fifth month. Regarding follow-up treatment, the offender is “supposed to be getting a discharge summary from the prison and we require them to do any follow-up treatment that’s recommended.” Report of Proceedings (RP) at 8.
The superior court then questioned Mr. Sype:
Q. What percentage ... of people with sentences comparable to what Mr. Barton would receive if he were given a DOSA . . . actually receive drug treatment while in prison?
A. . . . [I]t’s been my observation . . . that all of them have gotten treatment....
Q. Then I seem to recall you testifying in a prior hearing that there was some difficulty in getting the discharge summaries from the State facility?
A. That is . . . still a problem.
Q. And what impact. . . does that have on your ability to supervise?
*796A. It. . . makes things a little more difficult and — in about half the cases, the offender brings the discharge summary-paperwork with them . . . but we have a great deal of difficulty if they do not have any paperwork.
Q. . . . What is the nature of the two contacts per month that. .. would be required?
A. At least one face-to-face.
RP at 9-11. Mr. Sype recommended the DOSA program for Mr. Barton.
In argument, the parties disagreed about the efficacy of a DOSA sentencing. In declining a DOSA sentencing, the court reasoned:
Well, this brings back the issue that this court has been faced with several times recently and that is whether to approve a DOSA sentence when the Court has some concerns about the adequacy of the post-release supervision.
The PSI [presentence investigation report] that was submitted indicated that there were a significant amount of items located at the residence consistent with the manufacture of methamphetamine. And it was described, I think, as being one of the dirtiest sites that [the officers] had had the opportunity to be involved in ....
The PSI also indicates that Mr. Barton had made the conscious decision to allow his home to be used as a location for the manufacture of methamphetamine, that perhaps he was significantly involved with what I call the drug community. . . as he indicated an awareness of other individuals that he was unwilling to identify because of fears for his own safety.
Based on the information before the Court, the Court believes that technically Mr. Barton will qualify for the DOSA sentence, but this Court does not believe that the imposition of that sentence will benefit the community.
RP at 24-25 (emphasis added). The court concluded a DOSA sentence “would not benefit the community in light of the scope of conduct attributed to Mr. Barton and the court’s *797concerns about adequate follow-up following release from prison.” RP at 27.
Mr. Barton appealed.
ANALYSIS
The issue is whether the trial court, in exercising its sentencing discretion, erred in declining to sentence Mr. Barton under the DOSA provisions of RCW 9.94A.660. Mainly, Mr. Barton contends the sentencing judge violated principles relating to the doctrine of separation of powers.
The purpose of the separation of powers doctrine is “to prevent one branch of government from aggrandizing itself or encroaching upon the ‘fundamental functions’ of another.” State v. Bramme, 115 Wn. App. 844, 850, 64 P.3d 60 (2003) (citing Carrick v. Locke, 125 Wn.2d 129, 135, 882 P.2d 173 (1994)). In considering an argument that judicial action violates the separation of powers doctrine, one concern is that the judicial branch not be allowed tasks that are more properly accomplished by the other branches. State v. Hunter, 102 Wn. App. 630, 636, 9 P.3d 872 (2000). While it is well-settled in Washington that setting criminal penalties is a function of the legislature, see State v. Thorne, 129 Wn.2d 736, 767, 921 P.2d 514 (1996), the legislature may grant the trial court discretion in sentencing matters. See State v. Barnes, 117 Wn.2d 701, 710, 818 P.2d 1088 (1991).
RCW 9.94A.660 grants discretion to the sentencing court to sentence offenders using the DOSA option. It partly provides “the judge may waive imposition of a sentence within the standard sentence range and impose a sentence [under the DOSA alternative]” if it “determines that the offender is eligible . . . and that the offender and the community will benefit from use of the [sentencing] alternative.” RCW 9.94A.660(2). We hold that the legislative grant of discretion to the court is broad enough to include a determination by the court, after viewing the particular case facts, that the offender and the community will not *798both benefit from the sentencing alternative because of perceived program inadequacies.
Alternatively, the same reasoning applies here as was used in Bramme, where other appropriate reasons existed to deny a request for a DOSA sentence. In Bramme, 115 Wn. App. at 847, the sentencing court heard testimony about the inadequate level of supervision of offenders released after serving confinement time under a DOSA sentence, and about the difficulty in obtaining treatment information from the prisons because it is considered confidential medical information. The sentencing court cited this testimony in denying the offender a DOSA sentence, but it also held that the quantity of drugs involved precluded such a sentence. On appeal, this court declined to address the merits of the offender’s argument relating to separation of powers because it agreed with the sentencing court that he was ineligible for DOSA, in light of the amount of drugs involved. The court held that “given the record, we are confident the trial court would have found Mr. Bramme ineligible on that basis alone.” Bramme, 115 Wn. App. at 853.
Here, the court relied upon facts that Mr. Barton had permitted others to use his property for a methamphetamine lab, the site was one of the dirtiest sites the investigators had ever encountered, and Mr. Barton refused to identify the persons who were operating the lab. The trial court found that the latter fact indicated significant participation on Mr. Barton’s part in the drug network. We are convinced the trial court would have found DOSA inappropriate for Mr. Barton for these reasons, apart from its concerns about the adequacy of postrelease supervision.
In summary, we hold the trial court properly exercised its discretion. After considering and resolving the facts, where disputed, the trial court decided that the DOSA program as administered by the Department of Corrections was not *799appropriate for Mr. Barton. And, the additional reasons given by the court support the same result.
Affirmed.
Schultheis and Kurtz, JJ., concur.