
228 Kan. 712 (1980)
620 P.2d 1132
STATE OF KANSAS, Appellee,
v.
GERALD J. GREENLEE, Appellant.
No. 51,793
Supreme Court of Kansas.
Opinion filed December 6, 1980.
James S. Phillips, Jr., of Phillips & Phillips, of Wichita, argued the cause and was on the brief for appellant.
Ronald D. DeMoss, assistant district attorney, argued the cause and Robert T. Stephan, attorney general, and Vern Miller, district attorney, were with him on the brief for appellee.
The opinion of the court was delivered by
HOLMES, J.:
Gerald J. Greenlee appeals from convictions in a trial to the court, the Hon. Nicholas W. Klein presiding, of two counts of possession of marijuana and one count of sale of marijuana. K.S.A. 1979 Supp. 65-4127b(a)(3) and 65-4127b(b)(3). He was found not guilty of a second count of sale of marijuana. He also appeals from certain pretrial rulings made in connection *713 with his application to be admitted to the Sedgwick County diversion program administered by the district attorney.
On November 17, 1978, Greenlee allegedly sold, at his home, one ounce of marijuana to Wichita Police Department undercover agent William Boothe. No arrest was made at that time. On June 5, 1979, Boothe again visited defendant at his residence. Boothe was accompanied by another undercover agent, Detective Meyers, and their purpose was to purchase marijuana and arrest Greenlee. Greenlee admitted the two undercover agents to his house and then went to the refrigerator and removed a large bag of marijuana and dumped a portion of its contents into a cardboard box. The bag was replaced in the refrigerator. In the dining room Greenlee measured out an amount of marijuana, using a small scale, and put the measured amount in a small plastic bag. Before he gave the officers the bag he was placed under arrest. Greenlee dropped the bag on the floor and no money ever changed hands. The agents seized the small bag.
Officers then allowed Greenlee to go to the bedroom to change clothes. Detective Boothe seized the cardboard box and the scales which were still on the dining room table. As Greenlee was being returned from the bedroom, Detective Meyers seized a round tray and its contents which were later determined to be marijuana seeds and stems. Boothe also seized the remaining quantity of marijuana from defendant's refrigerator. Greenlee was charged with one count of possession and one count of sale of marijuana in connection with each incident. At trial on December 5, 1979, the marijuana purchased on November 17, 1978, and the small bag of marijuana, cardboard box, scales and the tray with its contents were admitted in evidence. The large bag of marijuana seized from the refrigerator was suppressed and not admitted in evidence. Greenlee was convicted of sale and possession for the November, 1978, incident and with possession for the June, 1979, incident and acquitted of the sale charge.
During the week of August 6, 1979, Greenlee submitted an application for admission to the pretrial diversion program administered by the office of the Sedgwick County District Attorney. On August 17, 1979, defendant met with Marty Miller, director of the diversion program, and was informed he would not be admitted to the diversion program since it was the policy of the Sedgwick County District Attorney's Office to exclude all *714 drug offenders from participation in the program. On August 21, 1979, Greenlee was officially notified that his application for diversion had been denied.
Greenlee then filed a motion in district court to compel the district attorney to either admit him to the diversion program or at least comply with the statutes which create the diversion program and provide guidelines for its implementation. K.S.A. 1979 Supp. 22-2906 et seq.
Associate Judge Elliott Fry heard defendant's pretrial motions and held K.S.A. 1979 Supp. 22-2907 and 22-2908 unconstitutional. He also ruled that the district attorney's policy excluding all drug offenders from the diversion program did not deny such persons of their right to equal protection and due process.
K.S.A. 1979 Supp. 22-2907 provides:
"22-2907. Diversion agreements authorized; policies and guidelines by district attorney; background information; right to counsel. (1) After a complaint has been filed charging a defendant with commission of a crime and prior to conviction thereof, and after the district attorney has considered the factors listed in K.S.A. 1978 Supp. 22-2908, if it appears to the district attorney that diversion of the defendant would be in the interests of justice and of benefit to the defendant and the community, the district attorney may propose a diversion agreement to the defendant. The terms of each diversion agreement shall be established by the district attorney in accordance with K.S.A. 1978 Supp. 22-2909.
(2) Each district attorney shall adopt written policies and guidelines for the implementation of a diversion program in accordance with this act. Such policies and guidelines shall provide for a diversion conference and other procedures in those cases where the district attorney elects to offer diversion in lieu of further criminal proceedings on the complaint.
(3) Each defendant shall be informed in writing of the diversion program and the policies and guidelines adopted by the district attorney. The district attorney may require any defendant requesting diversion to provide information regarding prior criminal charges, education, work experience and training, family, residence in the community, medical history, including any psychiatric or psychological treatment or counseling, and other information relating to the diversion program. In all cases, the defendant shall be present and shall have the right to be represented by counsel at the diversion conference with the district attorney."
K.S.A. 1979 Supp. 22-2908 provides:
"22-2908. Factors to be considered prior to diversion offer. In determining whether diversion of a defendant is in the interests of justice and of benefit to the defendant and the community, the district attorney shall consider at least the following factors among all factors considered:
(1) The nature of the crime charged and the circumstances surrounding it;
(2) any special characteristics or circumstances of the defendant;
(3) whether the defendant is a first-time offender and if the defendant has *715 previously participated in diversion, according to the certification of the judicial administrator;
(4) whether there is a probability that the defendant will cooperate with and benefit from diversion;
(5) whether the available diversion program is appropriate to the needs of the defendant;
(6) the impact of the diversion of the defendant upon the community;
(7) recommendations, if any, of the involved law enforcement agency;
(8) recommendations, if any, of the victim;
(9) provisions for restitution; and
(10) any mitigating circumstances."
Judge Fry held that the statutes constituted a legislative encroachment on the executive branch of government and were unconstitutional as a violation of the separation of powers doctrine long recognized in this state. While neither the federal nor Kansas constitution speaks directly to such a doctrine, it has been recognized that the very structure of the federal and state systems of government gives rise to the doctrine.
The doctrine of separation of powers is an outstanding feature of the American constitutional system. The governments, both state and federal, are divided into three branches, i.e., legislative, executive and judicial, each of which is given the powers and functions appropriate to it. Thus a dangerous concentration of power is avoided through the checks and balances each branch of government has against the others. For an excellent discussion of the historical development of the doctrine, see Van Sickle v. Shanahan, 212 Kan. 426, 511 P.2d 223 (1973). See also 16 Am.Jur.2d, Constitutional Law § 277, et seq., p. 764.
The basic meaning of the separation of powers doctrine is that the whole power of one department should not be exercised by the same hands which possess the whole power of either of the other departments. Dreyer v. Illinois, 187 U.S. 71, 47 L.Ed. 79, 23 S.Ct. 28 (1902); Van Sickle v. Shanahan, 212 Kan. 426. It does not necessarily follow, however, that an entire and complete separation is either desirable or was ever intended by the framers of the Constitution. The fact that the powers of one department may overlap with another department's powers has long been a recognized fact. Throughout the judicial history of this state early decisions attempted to apply the doctrine strictly, refusing to tolerate any overlapping of powers. State v. Johnson, 61 Kan. 803, 60 Pac. 1068 (1900). The more recent cases have modified the doctrine, taking a more pragmatic, flexible and practical approach *716 giving recognition to the fact there may be a certain degree of blending or admixture of the three powers of government and that absolute separation of powers is impossible. Leek v. Theis, 217 Kan. 784, 539 P.2d 304 (1975). See also Nixon v. Administrator of General Services, 433 U.S. 425, 53 L.Ed.2d 867, 97 S.Ct. 2777 (1977).
There have been a number of cases in Kansas dealing with the separation of powers and in them the following general principles are established:
(1) A statute is presumed to be constitutional. All doubts must be resolved in favor of its validity, and before a statute may be stricken down, it must clearly appear the statute violates the constitution. Leek v. Theis, 217 Kan. 784.
(2) When a statute is challenged under the constitutional doctrine of separation of powers, the court must search for a usurpation by one department of the powers of another department on the specific facts and circumstances presented. Leek v. Theis, 217 Kan. at 785; State, ex rel., v. Fadely, 180 Kan. 652, 308 P.2d 537 (1957).
(3) A usurpation of powers exists when there is a significant interference by one department with operations of another department. State, ex rel, v. Bennett, 219 Kan. 285, 547 P.2d 786 (1976).
(4) In determining whether or not a usurpation of powers exists a court should consider (a) the essential nature of the power being exercised; (b) the degree of control by one department over another; (c) the objective sought to be attained by the legislature; and (d) the practical result of the blending of powers as shown by actual experience over a period of time. State, ex rel., v. Bennett, 219 Kan. 285.
Did the legislature unconstitutionally usurp the power of the executive, i.e. the prosecutor, when it adopted K.S.A. 1979 Supp. 22-2907 and 22-2908?
Judge Fry evidently was of the opinion that the two statutes constituted an unwarranted usurpation of the prosecutor's power of discretion over whether or not to prosecute an individual charged with commission of a crime. The State argues the prosecution has absolute control and discretion of whether charges *717 shall be filed, a defendant prosecuted or a case dismissed. See State v. Kilpatrick, 201 Kan. 6, 439 P.2d 99 (1968); Foley v. Ham, 102 Kan. 66, 169 Pac. 183 (1917). The discretion whether or not to prosecute has long been the sacred domain of the prosecutor and stems from the common law nolle prosequi. "A nolle prosequi is a formal entry of record by the prosecuting attorney by which he declares that he is unwilling to prosecute a case, or that he will not prosecute a suit further." 21 Am.Jur.2d, Criminal Law § 512, p. 503. It has generally been held that "[i]n the absence of a controlling statute or rule of court, the power to enter a nolle prosequi before the jury is impaneled and sworn lies in the sole discretion of the prosecuting officer." 21 Am.Jur.2d, Criminal Law § 514, p. 504.
The statutes adopted in 1977 sought to establish a uniform procedure for a function which was already in existence in a number of counties across the state. The statutes do not enable the prosecutor to do anything that could not be done before. The prosecutor has always had the discretion to decide whether to file charges, to enter into plea bargaining, to reduce charges or to dismiss without prosecution. The statutes allow the prosecutor to file charges but postpone trial for a period of time while the accused participates in various rehabilitation programs. If the program is successfully completed, the charge will be dropped. Before the statutes were enacted, the prosecutor could, and many did, agree not to bring charges against an accused on the condition that he complete certain rehabilitation programs. A waiver of the statute of limitations and the right to a speedy trial could be signed and the effect was the same as that now provided by statute. In essence, this is the procedure now followed in Sedgwick County. The district attorney has no written policies or guidelines as required by 1979 Supp. 22-2907 and he does not adhere to the factors set forth in 1979 Supp. 22-2908. Is he required to follow the statutes and, if so, do the mandates of the statutes render them unconstitutional?
We pause to note that here we have the rather unusual situation of a defendant attempting to uphold the constitutionality of certain criminal statutes while the State is seeking to have them declared unconstitutional  an obvious switch from the ordinary case.
One of appellant's arguments is the decision to divert is a *718 quasi-judicial function and as such is tantamount to pretrial probation and therefore is not inherently within the purview of the executive branch of government. He cites cases from New Jersey and California as support for his argument, but in New Jersey the program was adopted by court rules and in California the statutes provide the courts shall administer the program. See State v. Leonardis, 73 N.J. 360, 375 A.2d 607 (1977), and People v. Superior Court of San Mateo County, 11 Cal.3d 59, 113 Cal. Rptr. 21, 520 P.2d 405 (1974). K.S.A. 1979 Supp. 22-2912 provides that the courts may adopt a diversion plan and if they do, the court is then required to follow the guidelines of 1979 Supp. 22-2908. If the program were established by court rule and administered by the courts then, of course, the proceedings would be a judicial function. However, the exercise of a similar function by the prosecutor under 1979 Supp. 22-2907 does not necessarily constitute an unconstitutional delegation of judicial power to the executive branch or an unconstitutional restriction on its executive powers which violates the separation of powers doctrine.
In State, ex rel., v. Bennett, 219 Kan. 285, we set forth certain tests to be applied to an allegation of a violation of the separation of powers doctrine. First, we look to the nature of the power being exercised. As previously indicated, the prosecutor has always had broad power of discretion in matters of determining whether to prosecute an action. The statute does not enlarge that inherent power nor does it destroy or unreasonably restrict it. The power being exercised, admittedly an executive one, is essentially the same with or without the statute, but in the interests of uniformity certain guidelines have been established.
Secondly, when we seek to determine whether the statutes create an unreasonable control on the prosecutor we find the contrary to be true. The control is minimal and the overall effect is merely to make the process of diversion more formal by setting a few procedural standards and establishing some degree of uniformity in procedure. The ultimate decision remains with the prosecutor.
Next, the objective sought by the legislature would appear to be to encourage a uniform procedure to provide an alternative to formal conviction of first-time offenders. The intent is one of rehabilitation and we find nothing offensive in that goal and nothing contrary to the valid objectives of the executive branch.
*719 Lastly, what is the practical effect of the statutes? It would appear the decision to grant diversion still rests largely with the prosecutor. The statutes require certain procedures be adopted and certain factors be considered toward the goal that a more uniform system will prevail throughout the various judicial districts. We discern no detriment to the prosecution and to the contrary uniformity and guidance have now been provided which did not previously exist.
As stated by one author:
"The key factor to this [pretrial diversionary] program seems to be the prosecutor, and there are only general guidelines for the development of the criteria to be used in determining eligibility for diversion in the statute." Keith G. Meyer, Survey of Kansas Law: Criminal Law and Procedure, 27 Kan. L. Rev. 391, 401 (1979).
There are many statutes enacted by the legislature which provide standards and guidelines to be followed by the executive and judicial branches of government and which have never been considered to be a violation of the separation of powers of the three branches of government. K.S.A. 21-4606 sets forth factors to be considered in fixing minimum terms; K.S.A. 21-4607 establishes factors for imposing fines; K.S.A. 1979 Supp. 38-808 mandates consideration of certain factors in certifying a juvenile for trial as an adult and there are many more. The statutes in question and the examples cited do not fall within the realm of action by the legislature which attempts to control or dictate the internal, administrative functions of the other branches which, of course, would be a clear encroachment upon and violation of the separation of powers doctrine. We hold that K.S.A. 1979 Supp. 22-2907 and 22-2908 are constitutional and do not violate the separation of powers doctrine. The district attorney should take immediate steps to bring his program into compliance with the statutes.
Appellant next presents several arguments asserting his constitutional rights to due process and equal protection have been violated due to the policy of the district attorney in not considering drug offenders for diversion; the failure of the district attorney to have a written program; the failure of the district attorney to follow the guidelines of 1979 Supp. 22-2908; the failure of the district attorney to give specific reasons for denying diversion; the failure of the court to order diversion, etc. While it is true the district attorney did not follow the statutory procedure and while *720 we have found the statutes to be constitutional, we fail to find where the constitutional rights of the appellant have been violated. There is no statutory right of any defendant to be granted diversion and certainly there was no such right at common law. The statutes merely establish a procedure to be followed by the county or district attorney and certain factors which are to be considered if diversion is to be considered. The prosecutor, after following the procedures and considering all the factors "may propose a diversion agreement to the defendant." The prosecutor is not required to propose diversion to any defendant.
Our statutes were patterned after those of the State of Oregon. Or. Rev. Stat. 135.881 et seq. The Oregon court has held adversely to the arguments of appellant in State v. Haas, 43 Or. App. 169, 602 P.2d 346 (1979).
In State v. Haas the plaintiff was indicted for a Class A felony. The district attorney refused to consider plaintiff for diversion under Or. Rev. Stat. 135.881 et seq., because it was his policy not to divert persons charged with Class A felonies. On appeal plaintiff contended that Or. Rev. Stat. 135.886 established a right for all persons charged with crimes to be considered for diversion in light of the specific factors listed in subsection (2). Those factors are almost identical to those found in K.S.A. 1979 Supp. 22-2908.
In rejecting plaintiff's argument that Or. Rev. Stat. 135.886 created a right in him to be considered for diversion, the Court of Appeals of Oregon held:
"If a district attorney's decision is discretionary, he necessarily must have authority to regard any particular factor or combination of factors  including but not necessarily limited to those specified in ORS 135.886(2)  as being dispositive for or against diversion. Nothing in ORS 135.886(2) suggests that the district attorney must weigh the factors listed in that subsection in a particular way, or that he cannot give decisive weight to any one or any combination of the factors in arriving at a decision regarding diversion.
"A particular district attorney might conclude that he will never exercise his discretion by offering diversion to persons charged with particular kinds of offenses, e.g., offenses of a given degree (such as Class A felonies), or offenses which he feels are susceptible to and in need of deterrence (such as shoplifting). ORS 135.886(2)(a) provides that one of the factors for the district attorney to consider is `[t]he nature of the offense.' If the district attorney has decided that he will never offer diversion in cases involving offenses committed in a particular manner, the subsection would be rendered absurd by an interpretation which requires, in cases where such offenses are involved, that he consider all of the factors it enumerates when one of the factors conclusively determines how he will exercise his discretion.

*721 "[1] According to plaintiff's allegations, the above example precisely duplicates the facts here. The district attorney has decided that persons charged with Class A felonies will not be diverted. We do not construe the statute as requiring him to perform the futile gesture of considering the other nine factors enumerated in ORS 135.886(2) when his decision not to divert is and properly can be based on the single factor specified in ORS 135.886(2)(a).
"[2] In addition to his statutory argument, plaintiff contends that he has been denied equal protection (U.S. Const., Amend. XIV; Or. Const., Art. I, § 20) and due process (U.S. Const., Amend. XIV) by defendant's refusal to consider him for diversion. As we understand plaintiff's constitutional arguments, both presuppose the existence of the statutory right which we have concluded the legislature has not conferred on him." State v. Haas, 43 Or. App. at 169.
Faced with a similar question, the Superior Court of Pennsylvania upheld a district attorney's policy of denying diversion to drunk drivers. The court recognized that the State, in the exercise of its police powers, may single out a class of persons for distinctive treatment if the classification bears a rational relation to the purpose of the policy being administered. Gladen v. State, 196 Kan. 586, 413 P.2d 124 (1966); Oyler v. Boles, 368 U.S. 448, 7 L.Ed.2d 446, 82 S.Ct. 501 (1962); Yick Wo v. Hopkins, 118 U.S. 356, 30 L.Ed. 220, 65 S.Ct. 1064 (1886). The Superior Court of Pennsylvania therefore held that the classification of drunken drivers as undesirable for diversion was reasonable because of the serious threat these people posed to the general public. Com. v. Kindness, 247 Pa. Super. Ct. 99, 371 A.2d 1346 (1977).
The rationale of Haas and Kindness is persuasive. The prosecutor, although possessing wide discretion is not immune from judicial review of the exercise of that discretion for arbitrariness. Bordenkircher v. Hayes, 434 U.S. 357, 54 L.Ed.2d 604, 98 S.Ct. 663 (1978); State v. Addington, 198 Kan. 228, Syl. ¶ 4, 424 P.2d 871 (1967). Considering the seriousness of the drug problem in society today, particularly its devastating effect upon young people, we cannot say the district attorney abused his discretion in determining not to offer diversion to drug offenders. We find no violation of appellant's constitutional rights to due process and equal protection and no merit to any of appellant's constitutional arguments about the pretrial diversionary procedures as they affected him.
We now turn to the trial errors asserted by appellant. Appellant first contends it was error for the court not to dismiss the count of possession of marijuana of which he was convicted because it is *722 multiplicitous in that possession is a lesser included offense of sale of marijuana. In State v. Woods, 214 Kan. 739, 522 P.2d 967 (1974), we considered the identical argument and held adversely to it. See also State v. Nix, 215 Kan. 880, 529 P.2d 147 (1974). We adhere to our decision in Woods.
Next, appellant claims error in the failure of the court to suppress as evidence the cardboard box, the scales and the tray with its contents of marijuana seeds and stems. All the items were in the plain view of the officers who were effecting a valid arrest and had a right to be in the position to see the items.
In Harris v. United States, 390 U.S. 234, 236, 19 L.Ed.2d 1067, 88 S.Ct. 992 (1968), the U.S. Supreme Court stated:
"It has long been settled that objects falling in the plain view of an officer who has a right to be in the position to have that view are subject to seizure and may be introduced into evidence."
See State v. Goodman, 3 Kan. App.2d 619, 599 P.2d 327 (1979); State v. Schur, 217 Kan. 741, 538 P.2d 689 (1975); and State v. McMillin, 206 Kan. 3, 476 P.2d 612 (1970). The argument lacks merit.
Finally, appellant contends there was insufficient evidence to support the convictions. We have reviewed the record and find overwhelming evidence to adequately meet the test of State v. Voiles, 226 Kan. 469, 601 P.2d 1121 (1979), and Jackson v. Virginia, 443 U.S. 307, 61 L.Ed.2d 560, 99 S.Ct. 2781 (1979).
The judgment of the district court finding K.S.A. 1979 Supp. 22-2907 and 22-2908 unconstitutional is reversed and the judgment of the district court as to the convictions of the appellant is affirmed.
