
392 N.W.2d 242 (1986)
STATE of Minnesota, petitioner, Appellant,
v.
Jean LAMBERT, Respondent.
No. C9-85-2381.
Supreme Court of Minnesota.
August 22, 1986.
Rehearing Denied September 29, 1986.
Hubert H. Humphrey, III, Atty Gen., St. Paul, David T. Magnuson, Ann L. Dieperink, Stillwater, for appellant.
Samuel A. McCloud, Dean S. Grau, Minneapolis, for respondent.
Considered and decided by the court en banc without oral argument.

OPINION
AMDAHL, Chief Justice.
We granted the petition of the state for review of the decision of the Court of Appeals ruling that, absent legislative authorization, trial courts may not adopt local sentencing guidelines for misdemeanor and gross misdemeanor cases. Reversing, we hold that legislation is not needed for trial courts to adopt advisory nonbinding guidelines for such cases.
At 1:10 a.m. on Sunday, May 26, 1985, Jean Lambert was arrested for DWI. She submitted to a breath test, which showed she had a blood alcohol concentration of .12. Her attorney reached an agreement with the prosecutor allowing her to plead guilty to a reduced charge of careless driving, partly because this was her first alcohol-related offense. At sentencing, on September 10, 1985, neither Lambert nor her attorney said anything in regard to proposed sentencing. The trial court was aware of the facts of the case and was aware of the results of the so-called alcohol assessment, which concluded that Lambert had no apparent drinking problem and which recommended that she attend a DWI course. The trial court sentenced her to $700 and 30 days, with $300 and 30 days suspended for 1 year conditioned on good conduct and attendance at a DWI course. Neither Lambert nor her attorney protested the sentence at that time, although the attorney asked the court if the sentence was pursuant to the court's guidelines, which had been made available to the members of the bar and the public at large. The trial court said that it was. Lambert apparently paid the fine immediately.
*243 On October 4, 1985, Lambert's attorney filed a motion for resentencing on the grounds that (a) the guidelines were not authorized by the legislature and (b) the trial court did not exercise its discretion. By order and memorandum dated December 18, 1985, the trial court denied the motion. The court ruled that the judges did not need legislative authorization to adopt the guidelines, that the guidelines were advisory and not binding, and that the sentence given Lambert was one authorized by law and was based on all the facts. It concluded by stating, in relevant part:
In the instant matter, the Court referenced the guidelines, found no aggravating or mitigating circumstances, consulted the alcohol assessment prepared by Washington County, and imposed the recommended sentence. The Defendant was throughout these proceedings given every opportunity to bring forth any facts in her favor and to raise every legal defense. [Citation omitted]. Reference to the guidelines did not amount to prejudgment of Defendant's case. The fact that she received the exact same sentence as if she had been convicted of DWI was not simply the result of a pre-arranged agreement between a group of judges she never had the opportunity to appear before, as contended by Defendant. Rather, sentence was arrived at by reference to applicable law, Minn.Stat. 169.13 and 609.03, to the guidelines and to the particular facts of this case. Unless there are mitigating circumstances, this Court, like many others in the state, is of the opinion that a DWI reduced or amended to any other misdemeanor should generally be treated as a DWI for sentencing purposes. (See, Minnesota Criminal Justice System DWI Task Force, DWI Sentencing Recommendations, Newsletter Vol. I, Number III, Page 6, August 1985).
The Court of Appeals, after granting discretionary review, reversed and remanded for resentencing "without regard to the trial court's sentencing guidelines." State v. Lambert, 388 N.W.2d 34, 38 (Minn.App. 1986). The court stated that "[h]owever desirable it may be for judges to establish local sentencing guidelines" for misdemeanor and gross misdemeanor cases which are not covered by the Minnesota Sentencing Guidelines, "authority to do so must come from the legislature." Id. at 37. It stated further that the trial court "mechanically" relied on the guidelines and did not consider Lambert's individual circumstances. Id. at 38.
The power to fix the limits of punishment for criminal acts rests with the legislature. State v. Osterloh, 275 N.W.2d 578, 580 (Minn.1978). However, the imposition of sentence within the limits set by the legislature is purely a judicial function. State v. Olson, 325 N.W.2d 13, 18 (Minn. 1982).
There is nothing in the state constitution which prevents an individual judge from formulating his own guidelines  either in his head or on paper  and following them generally, so long as he gives the individual defendant due process by letting him be heard and by considering relevant facts bearing on the exercise of sentencing discretion. Before the statewide guidelines for felony sentences were adopted and before appellate review of sentences was authorized, we took the position that generally, so long as a sentence was authorized by law and so long as the trial court had given the defendant due process at sentencing and had not discriminated against the defendant in violation of the equal protection clause, the sentence would stand, even in glaring cases where a more culpable codefendant had been sentenced more leniently by a different judge. See State v. Gamelgard, 287 Minn. 74, 177 N.W.2d 404 (1970).
It is true that in Gamelgard we recommended to the legislature that it consider the problem of disparities in sentencing and stated that there was a need for statewide standards and appellate review of sentences. Id. at 80, 177 N.W.2d at 408. It is also true that the legislature authorized appellate review of sentences (Minn.Stat. § 244.11 (1984)) and established the Sentencing Guidelines Commission for the promulgation *244 of statewide standards for felony sentences. But that does not mean that the judges of a given district cannot adopt nonbinding advisory guidelines for misdemeanor and gross misdemeanor sentences (which are not covered by the Minnesota Sentencing Guidelines) in an attempt to eliminate glaring disparities in misdemeanor and gross misdemeanor sentencing.
Absent local guidelines, each judge in a district presumably has his own informal guidelines  either in his head or on paper  which he generally follows in misdemeanor and gross misdemeanor sentencing. One judge might generally impose only a fine in the typical case of DWI whereas another might impose some jail time on identical facts. There is nothing in the constitution which prevents the judges in the districts from cooperating and agreeing to a common set of guidelines in the hope of achieving greater fairness and uniformity in misdemeanor and gross misdemeanor sentencing, so long as the judges give the defendant an opportunity to be heard, consider all the facts bearing on the exercise of the sentencing discretion given by the legislature, and treat the guidelines only as general nonbinding guidelines. See 3 A.B.A. Standards for Criminal Justice, Sentencing Alternatives and Procedures § 18-8.1 and Commentary (2 ed. 1980) (discussing the establishment by judges of sentencing councils as a possible alternative to reliance on a legislatively-created guidelines drafting agency; stating that the role of such a council should be advisory, with the individual judge being free to exercise his own discretion and impose any lawful sentence based on the facts relevant to sentencing). Cf. State ex rel. Taylor v. Schoen, 273 N.W.2d 612 (Minn.1978) (upholding parole board's adoption of parole release guidelines to be considered in exercising its discretion whether to place individual prisoner on parole; holding also that failure of the parole guidelines to distinguish between men and women in light of differing recidivism rates did not violate the equal protection clause because the guidelines were only a guide and the board relied on other factors in addition to the guidelines).
Accordingly, defendant's sentence is reinstated.
Reversed and sentence reinstated.
