
658 P.2d 266 (1983)
Terry Lee FLOWER, Petitioner,
v.
The PEOPLE of the State of Colorado, Respondent.
No. 82SC60.
Supreme Court of Colorado, En Banc.
February 7, 1983.
J. Gregory Walta, Colo. State Public Defender, Gerald E. Piper, Deputy State Public Defender, Denver, for petitioner.
J.D. MacFarlane, Atty. Gen., Charles B. Howe, Deputy Atty. Gen., Joel W. Cantrick, Sol. Gen., Nathan B. Coats, Asst. Atty. Gen., Enforcement Section, Denver, for respondent.
NEIGHBORS, Justice.
Pursuant to a written plea agreement, the defendant was convicted of second degree burglary, section 18-4-203, C.R.S.1973 (1978 Repl.Vol. 8). The offense is a class 4 felony and carries a presumptive sentence of two to four years, plus one year of parole. The maximum sentence which may be imposed is eight years plus one year of parole. Section 18-1-105, C.R.S.1973 (1982 Supp. to 1978 Repl.Vol. 8). The trial court found extraordinary aggravating circumstances and sentenced the defendant to the maximum sentence. The court of appeals, *267 644 P.2d 64, upheld the sentence and we granted certiorari. We affirm.
The defendant contends that (1) the trial court erred in considering his prior criminal record in finding extraordinary aggravating circumstances, and (2) the record does not contain sufficient evidence of extraordinary circumstances to warrant an eight year sentence, even if his prior criminal record is relevant. We do not find merit in either argument.
The facts surrounding the incident which led to the defendant's arrest and conviction are not in dispute. On January 2, 1980, officers of the Pueblo Police Department saw that illegal entry had been gained to the Goodwill Industries store on Union Avenue in Pueblo, Colorado. The front window had been broken and the offices ransacked. The Pepsi machine had been opened and the coin boxes removed, emptied, and left on the floor. An empty calculator box and an empty Miller's beer bottle were found. The director of Goodwill Industries told the police that a brown and gold coin box used for coffee money was missing. The police checked bars in the neighborhood for possible suspects. The defendant was located in one of the establishments. A brown and gold coin box and a calculator were next to him on the bar. The box and the calculator were identified as property taken from the Goodwill offices. It was later determined that the fingerprints on the beer bottle matched those of the defendant.
The defendant was arrested, taken into custody, and charged with second degree burglary. Shortly thereafter he posted bond and was released. On January 30, 1980, while on bond, the defendant was arrested and charged with the burglary of a jewelry store. The second burglary charge is not directly involved in this appeal.
The defendant entered into negotiations for a plea agreement with the district attorney. In March of 1980, a proposed plea agreement was submitted to the court. In April, the court rejected the agreement based on the contents of the presentence report. The court noted the discrepancy between the defendant's recollection of two prior felony convictions and the probation department's report of approximately six prior felony convictions.[1]
On July 30, 1980, a new plea agreement was reached and approved by the court. The defendant agreed to plead guilty to the burglary of the Goodwill Industries store and, in another case, to the burglary of Pettyjohn's Jewelers. No sentence concessions were made. The defendant was fully advised of his rights as required by Crim.P. 11, and was warned by the trial court to "go over that presentence report in detail because certainly my sentencing is going to be dependent upon the accuracy of [the defendant's] prior record."
At the sentencing hearing on August 22, 1980, the defendant presented no evidence to rebut the information contained in the presentence report, nor was any statement in mitigation made on behalf of the defendant. The court accepted the defendant's guilty plea and imposed an eight year sentence plus one year of parole and gave credit for six days of presentence confinement.
On August 28, 1980, the court issued written findings and orders, nunc pro tunc August 22, 1980, as required by section 18-1-105(7), C.R.S.1973 (1982 Supp. to 1978 Repl.Vol. 8).[2] The court noted the circumstances surrounding the offense and the character and record of the defendant, including the *268 following: The defendant had a record as a juvenile offender. The defendant testified under oath that he had only two prior felony convictions, while in fact, he had at least six prior felonies. He was on parole when he committed the burglary of the Goodwill Industries store, and pleaded guilty to a second burglary committed while he was on bond. No evidence of extraordinary mitigating circumstances was presented for the court's consideration.
The defendant argues that the legislative intent and established rules of statutory construction require that a defendant's prior criminal record not be considered in determining the existence of extraordinary aggravating circumstances. The defendant urges us to adopt the reasoning of the dissent in People v. Gonzales, 44 Colo.App. 411, 613 P.2d 905 (1980). We respectfully decline and affirm our decision in People v. Phillips, 652 P.2d 575 (Colo.1982). We stated:
"To accept the reasoning of the Gonzales dissent would be to conclude that `the nature and elements of the offense' and `the character and record of the offender' cannot be `aggravating or mitigating circumstances surrounding the offense and the offender.' Although this argument has a certain superficial appeal, we must conclude that the legislature intended no such result. Rather, looking at section 18-1-105 as a whole, it appears that what the legislature intended was `other aggravating or mitigating circumstances.' To conclude otherwise would be to render subsection (6) mere surplusage, contrary to the well-established rule of statutory construction that the entire statute is intended to be effective. Section 2-4-201(1)(b), C.R.S.1973 (1980 Repl.Vol. 1B)."
652 P.2d at 578. From this analysis it is clear that section 18-1-105(1)(b) requires the sentencing court to consider the nature and elements of the offense, the character and record of the offender, as well as all other aggravating or mitigating circumstances. If aggravating or mitigating circumstances exist, and if the court finds them to be extraordinary, subsection (6) provides for the imposition of a sentence lesser or greater than the presumptive range. In Phillips, we held that:
"[T]he words `extraordinary mitigating or aggravating circumstances' mean that among the factors the trial court may weigh and consider are ... past conduct,... pattern of conduct which indicates whether he is a serious danger to society, past convictions, and possibility of rehabilitation. The reference in section 105(6) to the presentence report reflects the legislative intent that the court should consider the prior history and circumstances of the defendant ... in determining whether there are facts which justify imposition of a sentence lesser or greater than the presumptive range." (Footnote omitted.)
652 P.2d at 580. See also People v. Cantwell, 636 P.2d 1313 (Colo.App.1981), cert. granted, Nov. 16, 1981, cert. dismissed, No. 81SC323, July 26, 1982. We conclude that the trial court properly considered the defendant's prior criminal history in its determination of extraordinary circumstances.
The defendant's second argument is that there is insufficient evidence, even considering his criminal record, to justify the sentence imposed.[3] We disagree. Sentencing, by its very nature, is a discretionary act that is not subject to scientific precision. People v. Horne, 657 P.2d 946 (Colo.1983); People v. Phillips, supra; People v. Warren, 200 Colo. 110, 612 P.2d 1124 (1980); People v. Robert Scott, 200 Colo. 402, 615 P.2d 35 (1980); People v. Watkins, 200 Colo. 163, 613 P.2d 633 (1980). The sentencing decision requires the weighing of various factors and should reflect "a rational selection from various sentencing alternatives in a manner consistent with the dominant aims of the sentencing process." *269 Watkins, 613 P.2d at 636. The goals of sentencing under the Colorado Criminal Code are punishment, fair and consistent treatment, deterrence, and rehabilitation. Section 18-1-102.5, C.R.S.1973 (1982 Supp. to 1978 Repl. Vol. 8). "[W]hile rehabilitation may be the preferred method for preventing crime, an extended term of confinement is sometimes necessary in order to protect the public from further criminal activity by the offender and to adequately provide for individual deterrence and correction." People v. Warren, 612 P.2d at 1126.
It is apparent from the record that the trial court found that the protection of the public warranted an extended sentence. The record establishes that the defendant has an extensive criminal background, was on parole at the time the offense was committed, and committed yet another burglary while on bond in this case. The record shows no abuse of discretion by the trial court. People v. Cantwell, supra.
The judgment is affirmed.
NOTES
[1]  The record is unclear as to the exact number of offenses for which the defendant was convicted before this incident. The defendant told the trial court that he had two felony convictions arising out of incidents in Lamar, Colorado. The presentence report disclosed one felony conviction from Toledo, Ohio, one from Littleton, Colorado, one from Lamar, Colorado, one from Scott City, Kansas, and two from Nebraska. The report also revealed two arrests for escape. At the sentencing hearing the court counted six felonies: two in Kansas, two in Nebraska, and two in Colorado. In any event, it is clear that at the time of sentencing the defendant had at least six prior felony convictions.
[2]  Section 18-1-105(7), C.R.S.1973, was enacted in 1979. It applies to offenses committed on or after July 1, 1979.
[3]  The sentence imposed, eight years plus one year parole, is the maximum allowed by statute. Section 18-1-105(6), C.R.S.1973 (1982 Supp. to 1978 Repl.Vol. 8), provides for a sentence no greater than twice the maximum authorized in the presumptive range, if extraordinary circumstances are found.
