
675 N.E.2d 727 (1996)
Michael F. PRITSCHER, Appellant-Defendant,
v.
STATE of Indiana, Appellee-Plaintiff.
No. 79A02-9601-CR-58.
Court of Appeals of Indiana.
December 31, 1996.
*728 Michael A. Morrissey, O'Brien & Morrissey, Lafayette, for Appellant-Defendant.
Pamela Carter, Attorney General, Andrew L. Hedges, Deputy Attorney General, Indianapolis, for Appellee-Plaintiff.

OPINION
KIRSCH, Judge.
Pursuant to a plea agreement, Michael Pritscher pled guilty to three counts of dealing cocaine,[1] as Class B felonies. He appeals the length of his sentence, presenting several issues for review which we restate as follows:
I. Whether the imposition of consecutive sentences was manifestly unreasonable where the three drug transactions underlying the convictions were similar and part of a police undercover operation;
II. Whether Pritscher's sentence is unconstitutionally disproportionate to the nature of the offense; and
III. Whether Pritscher's sentence of thirty-eight years' imprisonment and four years probation are contrary to Indiana law.
We affirm.

FACTS AND PROCEDURAL HISTORY
The evidence most favorable to the judgment shows that on April 23, May 25, and June 13, 1993, a Lafayette Police Department informant purchased 3.35, 2.93, and 2.92 grams, respectively, of cocaine from Pritscher at Pritscher's residence. Pritscher was charged with two counts of dealing in cocaine as a Class B felony,[2] and one count each of dealing in cocaine as a Class A felony,[3] maintaining a common nuisance,[4] possession of marijuana,[5] and reckless possession of paraphernalia.[6] He entered into a plea agreement wherein he agreed to plead guilty to three counts of dealing in cocaine, as Class B felonies, to pay restitution, to give information regarding other drug activity in the community, and to pass a polygraph to demonstrate the truthfulness of that information. In return, Pritscher was to receive a reduction of the Class A to a Class B felony, dismissal of the remaining counts, and a thirty-year sentence cap subject to invalidation if Pritscher failed his polygraph.
*729 Pritscher failed his polygraph, and the trial court sentenced him to thirty-eight years imprisonment, four years probation, and ordered him to pay $1,100 in restitution.

STANDARD OF REVIEW
The determination of a defendant's sentence is within the trial court's discretion, and such a determination will be reversed only upon a showing of manifest abuse of that discretion. Ector v. State, 639 N.E.2d 1014, 1015 (Ind.1994). The trial court's discretion includes the weighing of aggravating and mitigating factors to determine an appropriate sentence. Id. The legislature prescribes penalties for crimes, and a trial court's sentencing discretion does not extend beyond the statute's parameters. Golden v. State, 553 N.E.2d 1219, 1222 (Ind.Ct.App. 1990), trans. denied. Thus, we review a sentence to determine whether it was statutorily authorized and whether it was imposed after a properly conducted presentence hearing.[7] If the sentence lies within its statutory limits, and it is not otherwise impermissible under our federal or state constitutions, we will overturn a sentence only when it is manifestly unreasonable. Ind.Appellate Rule 17(B)(1); Hardebeck v. State, 656 N.E.2d 486, 490 (Ind.Ct.App.1995) trans. denied. A sentence is manifestly unreasonable if "no reasonable person could find such sentence appropriate to the particular offense and offender." Ferrell v. State, 565 N.E.2d 1070, 1073 (Ind.1991).

DISCUSSION AND DECISION

I. Manifestly Unreasonable Sentence
Pritscher contends that because the three drug sales underlying his convictions were similar, occurred within a fifty-two-day time frame, and were staged by the police, the trial court's imposition of consecutive sentences was manifestly unreasonable. He relies on Beno v. State, 581 N.E.2d 922 (Ind. 1991), where the court overturned the defendant's sentence as manifestly unreasonable because the underlying convictions were based on police sting operations and similar fact situations. Pritscher argues that the facts of his case are similar to those in Beno and that therefore his sentence should be overturned. We disagree.
Beno sold 3.1 and 2.9 grams of cocaine to the same police informant at the same location, within a four-day time span. He was charged with and convicted of dealing in cocaine as a Class A felony, dealing in cocaine as a Class B felony, and maintaining a common nuisance. In sentencing Beno, the trial court stated:
"I don't see anything at all wrong with sending a very clear message to every person in the State that somewhere along the line the buck's gotta stop and it's gotta stop right here at this bench."
Id. at 923. The trial court imposed the maximum fine of $30,000, and the maximum aggravated sentence on each count, to be served consecutively, in order that Beno would "never see the light of day again." Beno, 581 N.E.2d at 924. Our supreme court rejected the propriety of such motivation, and in reversing the sentence imposed by the trial court stated:
"We recognize that one of the many goals of penal sentencing is its deterrent effect. We do not believe, however, that a trial judge should be allowed to use the sentencing process as a method of sending a personal philosophical or political message. A trial judge's desire to send a message is not a proper reason to aggravate a sentence."
Id. The court noted that the probation department had recommended that Beno's sentences be served concurrently, that the State did not request consecutive sentences, and that the trial court's stated motivation for consecutive sentences was to make an example of Beno to other drug dealers. The court phrased its holding thus:
"We simply hold that, in this case, such sentencing is not appropriate.... We understand the rationale behind conducting more than one buy during a sting operation, however, we do not consider it appropriate to then impose maximum and *730 consecutive sentences for each additional violation."
Id. (emphases added).
The facts here are not the same as those in Beno. First, Beno's sales spanned a period of four days; Pritscher's sales spanned a period of almost two months. Second, each time Beno's informant approached Beno at his house to buy cocaine, either Beno or his friend had to leave and obtain the drug before returning to the house to conclude the sale; each time Pritscher's informant approached Pritscher to buy cocaine, Pritscher had the drug immediately at hand, in his home, and ready for sale. Third, Beno was charged with and convicted on all original counts; Pritscher was originally charged with six separate counts, but sentenced only on three counts, one of which was reduced, in accordance with a plea agreement. Fourth, Beno was sentenced to the maximum aggravated term on all counts, totaling seventy-four years' imprisonment, and the maximum fine of $30,000.00. Pritscher was sentenced, not to the maximum of sixty years' imprisonment available under his plea agreement in the event he did not pass his polygraph, but to thirty-eight years' imprisonment, four years' probation, and payment of $1,100 in restitution;[8] no fine was imposed. Record at 192.
Moreover, the thirty-eight-year executed term is only eight years beyond the thirtyyear cap Pritscher agreed to in his plea agreement, a cap which was invalidated according to the agreement when Pritscher failed his polygraph examination. Unlike Beno, Pritscher agreed to give the police information regarding drug activities, then failed the polygraph designed to ascertain the truthfulness of that information. According to the terms of the plea agreement, the trial court could have enhanced Pritscher's sentences to the maximum of twenty years on each count, see IC XX-XX-X-X, but did not. Beno received the maximum sentence and fine allowable. Pritscher received presumptive sentences of ten years each, enhanced by four years each, rather than enhanced by the maximum ten, and no fine. In Beno, the trial court acted against the sentencing recommendations of both the probation department and the State. Here, the trial court did not act against the sentencing recommendations of the State. Moreover, unlike Beno, the trial court did not attempt to make an example out of Pritscher.
Pritscher also cites Gregory v. State, 644 N.E.2d 543, 545 (Ind.1994), in support of the Beno rule. However, our supreme court stated that Gregory was "a case with similar facts" as Beno, and held that "on these facts, a sentence of 120 years was inappropriate." Id. at 546 (emphasis added). Because Gregory `s facts are similar to those of Beno, and because, as discussed above, the Beno facts are distinguishable from those of the case at bar, Gregory is also factually distinguishable.
The record must disclose the trial court's findings of aggravating or mitigating circumstances, and its reasoning justifying variance from the presumptive sentence. IC XX-XX-X-X. A trial court is not limited to, but may consider, the following factors as aggravating when ordering consecutive sentences: (1) the person recently violated probation; (2) the person has a history of criminal activity; (3) the person is in need of correctional or rehabilitative treatment that can best be provided by commitment of the person to a penal facility. IC XX-XX-X-X.1. Here, the trial court stated its findings of aggravating and mitigating circumstances, and its reasoning justifying variance from the presumptive sentence thus:
"The Court finds the following mitigating factors: Defendant is a high school and college graduate. Defendant was dyslexic and attended St. John's Military Academy. Defendant is remorseful.
"The Court finds no statutory mitigating factors.
"The Court finds the following aggravating factors: Defendant has a history of criminal activity. On March 18, 1987 defendant received a withheld prosecution for public intoxication, carrying a concealed weapon *731 (handgun) and discharging a firearm in the city limits.
"Defendant was convicted on June 4, 1991 for possession of stolen property as a Class D felony.... Defendant was given 18 months at the Department of Correction and ordered to serve ninety days (was released on 7-29-91) and placed on probation for 15 months which the defendant completed.
"Defendant had these two prior arrests, both involving firearms and defendant was also carrying a firearm in connection with his cocaine dealings.
"Defendant has seventeen years of being actively involved in the illegal use and sale of cocaine and other illegal drugs in this community at the A and B felony level. Defendant is seriously addicted to cocaine. Defendant was earning over $100,000.00 a year from the illegal sale of cocaine in the community.
"Defendant has no history of trying to get drug treatment.
"Defendant violated the terms of probation by dealing illegal drugs.
"Defendant is in need of correctional and rehabilitative treatment that can best be provided by his commitment to a penal facility.
"The Court finds the aggravating factors outweigh the mitigating factors."
Record at 62-64.
Pritscher argues that Beno precludes consecutive sentences for convictions resulting from a police sting operation. We disagree. Pursuant to convictions resulting from a police sting operation, the trial court in McCollum v. State, 582 N.E.2d 804 (Ind.1991) ordered each of two conspiracy counts to run concurrent with each of two associated dealing counts, and ordered the two dealing counts, one of which was enhanced, to be served consecutively, totaling 110 years. Id. at 808. Our supreme court held that the trial court did not abuse its discretion by enhancing the presumptive sentence and ordering consecutive terms for dealing cocaine although the crimes underlying the convictions were set up by police drug enforcement officers. Id., 582 N.E.2d at 817.
Pritscher's sentence is not manifestly unreasonable.

II. Sentence Proportionality
Pritscher next contends that his sentence is disproportionate to the nature of the offenses in violation of the Indiana Constitution which provides that "All penalties shall be proportioned to the nature of the offense." Ind. Const. Art. 1, § 16.
"The nature and extent of penal sanctions are primarily legislative considerations and courts are not at liberty to set aside a legislatively sanctioned penalty because it may seem too severe to the court." Clark v. State, 561 N.E.2d 759, 765 (Ind.1990). Here, our legislature provided the following sentence for a conviction under IC XX-XX-X-X:
A person who commits a Class B felony shall be imprisoned for a fixed term of (10) ten years, with not more than ten (10) years added for aggravating circumstances ... in addition, he may be fined not more than ten thousand dollars ($10,000).
IC XX-XX-X-X. Thus, the legislature has prescribed a maximum sentence of twenty years on each count where, as here, the court finds aggravating circumstances. On each of Pritscher's three convictions, he was sentenced to fourteen years. He was not fined on any count. This sentence is well within the parameters set by the legislature.
That Pritscher's sentence falls within legislatively determined parameters does not relieve the reviewing court of the constitutional duty to review the duration of Pritscher's sentence, because it is possible for the statute under which he was convicted to be constitutional, and yet be unconstitutional as applied to Pritscher in this particular case. Clark, 561 N.E.2d at 765. A sentence, even under a valid statute, may be unconstitutional by reason of its length, if it is so severe and entirely out of proportion to the gravity of the offenses committed as "to shock public sentiment and violate the judgment of a reasonable people." Cox v. State, 203 Ind. 544, 549, 181 N.E. 469, 472 (1932).
Here, Pritscher's plea agreement, paragraph 2, provided:
"That the defendant shall receive such sentence as the Court deems appropriate, after *732 hearing any evidence or argument of counsel. However, the executed portion of any sentence imposed may not exceed thirty (30) years. Further, the State of Indiana will not argue for an executed sentence or any specific length of sentence to be imposed."
Record at 54. The plea agreement, paragraph 4, required Pritscher to give the police a statement relating his knowledge of criminal activity. Regarding that statement, paragraph 5 provided:
"That the defendant must pass a polygraph examination given by an examiner selected by the Prosecutor to demonstrate that the defendant has spoken truthfully in all respects in the statement given under paragraph 4; and that, if the defendant does not pass the polygraph as required, the Court may impose whatever sentence it deems appropriate without regard to the limitations imposed under paragraph 2, and the State may argue for an executed sentence or any specific length of sentence to be imposed. The Prosecutor may cancel the agreement and the defendant may withdraw his plea of guilty in that event."

Record at 55 (emphases added).
Pritscher gave his statement, but failed his polygraph test. He chose not to withdraw his guilty plea. Under the terms of the plea agreement, Pritscher could have been sentenced for a term of up to thirty years even if he had passed his polygraph test. Pritscher apparently considered this sentence to be reasonable, for he agreed to it. Because he did not pass the test, and because he chose not to withdraw his guilty plea, the agreement provided that the trial court could have sentenced Pritscher to "whatever sentence it deems appropriate." Each count of dealing in cocaine as a Class B felony carries a presumptive sentence of 10 years, and a fine of no more than $10,000. See IC XX-XX-X-X. Each sentence may be enhanced by up to ten years. Id. Thus, the trial court potentially could have sentenced Pritscher to a maximum prison term of sixty years, and a maximum fine of $30,000. Pritscher apparently considered this sentence, too, to be reasonable, for he agreed to the possibility of its imposition should he fail his polygraph. Even so, the trial court imposed thirty-eight years executed, four years' probation, and no fine.
By pleading guilty pursuant to a plea agreement which contained a negotiated sentence recommendation, Pritscher "knowingly, voluntarily, and intelligently recognized and admitted the enhanced sentence was fair and justified in light of the `bargain' struck between the prosecutor and himself." See Munger v. State, 420 N.E.2d 1380, 1386 (Ind. Ct.App.1981). Because Pritscher himself found his two sentence possibilities reasonable, as evidenced by his agreement, because both sentences properly fall within their statutory parameters, and because of the aggravators present here, we cannot find the imposition of one of the condoned sentences to be so severe and entirely out of proportion to the gravity of the offenses committed as "to shock public sentiment and violate the judgment of a reasonable people." See Cox, 203 Ind. at 549, 181 N.E. at 472.
Moreover, a plea agreement is contractual in nature, binding the defendant, the state, and the trial court. Pannarale v. State, 638 N.E.2d 1247, 1248 (Ind.1994). It is within the trial court's discretion to accept or reject a plea agreement and the sentencing provisions therein; however, if the court accepts such an agreement, it is strictly bound by its sentencing provision and is precluded from imposing any sentence other than that required by the plea agreement. State ex rel. Goldsmith v. Marion County Superior Court, 275 Ind. 545, 419 N.E.2d 109, 114 (1981). Where the trial court finds an agreed to sentence acceptable, that fact in and of itself justifies the imposition of an aggravated sentence if such a sentence falls within the agreement's parameters. Munger, 420 N.E.2d at 1386. "If the court accepts a plea agreement, it shall be bound by its terms." IC XX-XX-X-X(e); Pannarale, 638 N.E.2d at 1248. Our supreme court has stated:
"The concept of plea bargaining contemplates an explicit agreement between the State and defendant which is binding upon both parties when accepted by the trial court. To allow the trial court to either increase or suspend the executed sentence *733 would deny the parties the essential purpose of their agreement. It is to the interest of both the defendant and the public to facilitate expeditious disposition of criminal cases. Strict adherence to the agreement is essential to this purpose."
"If the tendered recommendation calls for an executed sentence, the trial court may either accept or reject the recommendation. Moyer v. State[, 177 Ind.App. 461] 379 N.E.2d 1036 (1978).... [W]hen the defendant pleads guilty to a lesser offense and no term is specified in the plea bargain recommendation, sentencing falls within the ambit of the trial court's discretion upon acceptance of the agreement."
State ex rel. Goldsmith, 419 N.E.2d at 114 (emphases added). Here, Pritscher pled guilty to a lesser offense and had three other charges dropped; since he failed his polygraph, he was subject to the plea agreement's provision that "the Court may impose whatever sentence it deems appropriate." Record at 55. Had Pritscher passed his polygraph, he was subject to an executed sentence of up to thirty years. He did not pass his polygraph. The trial court sentenced him to a thirty-eight year prison term and four years probation. Pritscher's expectations of the agreement were fulfilled. Either party to the plea agreement could have moved to withdraw the agreement before the defendant entered the guilty plea and the court accepted the agreement. Badger v. State, 637 N.E.2d 800, 803 (Ind.1994). "[T]o permit a defendant to enter a plea bargain binding on the court and thereafter retain the benefit of the bargain while relieving himself of its burden, would operate as a fraud upon the court." Moyer v. State, 177 Ind.App. 461, 463, 379 N.E.2d 1036, 1038 (Ind.Ct.App.1978). Moreover, under the plea agreement, Pritscher had a second opportunity to withdraw his guilty plea when he failed the polygraph examination, but he chose not to do so.
The trial court considered the aggravating and mitigating factors and found that the aggravating factors outweighed the mitigating factors. Record at 62-64. The balancing of aggravating and mitigating factors is qualitative, not quantitative; it is within the trial court's discretion to determine the sentencing weight to be given those factors. Penick v. State, 659 N.E.2d 484, 488 (Ind. 1995).
Pritscher's sentence is not disproportionate to the nature of his offenses and the aggravating factors.

III. Exceeding Presumptive Sentence
Pritscher finally contends that his sentence is contrary to the portion of IC XX-XX-X-X which provides:
"[T]he total of the consecutive terms of imprisonment ... to which the defendant is sentenced for felony convictions arising out of an episode of criminal conduct shall not exceed the presumptive sentence for a felony which is one class of felony higher than the most serious of the felonies for which the person has been convicted."
IC XX-XX-X-X(c). Pritscher argues that since he was sentenced for Class B felonies he may not be ordered to serve more than the thirty-year presumptive sentence for a Class A felony.[9]
However, Pritscher was sentenced in 1993, and the portion of IC XX-XX-X-X upon which he relies was not added by the legislature until 1994.[10] "The general rule is that the law in effect at the time the crime was committed is controlling". Lunsford v. State, 640 N.E.2d 59, 60 (Ind.Ct.App.1994) (citing Dowdell v. State, 166 Ind.App. 395, 399, 336 N.E.2d 699 (Ind.Ct.App.1975)); Rowold v. State, 629 N.E.2d 1285, 1288 (Ind.App.1994). The portion of IC XX-XX-X-X in effect at the time of Pritscher's sentencing provides that "the court shall determine whether terms of imprisonment shall be served concurrently or consecutively." IC XX-XX-X-X(a).
If the legislature amends a sentence, courts must discern whether the legislature intended the amended sentence to be applied retroactively. Dowdell, 166 Ind.App. at 400, 336 N.E.2d at 701. Under the doctrine of amelioration, when the penalty for a crime is decreased by an amendment enacted after *734 the commission of the crime but prior to sentencing, the defendant may take advantage of the ameliorative statute. Rowold, 629 N.E.2d at 1288. However, Pritscher was sentenced prior to the enactment of the version of IC XX-XX-X-X upon which he relies; thus that version of the statute is inapplicable to Pritscher's sentencing. Pritscher's sentence properly falls within the parameters of the statute in force at the time he was sentenced.
Affirmed.
ROBERTSON and NAJAM, JJ., concur.
NOTES
[1]  See IC XX-XX-X-X(a).
[2]  Id.
[3]  See IC XX-XX-X-X(b).
[4]  See IC XX-XX-X-XX.
[5]  See IC XX-XX-X-XX(1).
[6]  See IC XX-XX-X-X.3(c).
[7]  See IC § 35-38-1-3.
[8]  Pritscher was ordered to pay $1,100.00 in restitution of the money used by the police informant in making the three sales to Pritscher.
[9]  See IC XX-XX-X-X.
[10]  See P.L. 164-1994, SEC.1.
