
93 Wis.2d 278 (1980)
286 N.W.2d 559
ELIAS, Plaintiff in error,
v.
STATE, Defendant in error.
No. 77-390-CR.
Supreme Court of Wisconsin.
Submitted on briefs December 5, 1979.
Decided January 8, 1980.
*280 For the plaintiff in error the cause was submitted on the briefs of Howard B. Eisenberg, state public defender, and Jack E. Schairer, assistant state public defender.
For the defendant in error the cause was submitted on the brief of Bronson C. La Follette, attorney general, and John M. Schmolesky, assistant attorney general.
CONNOR T. HANSEN, J.
The record reflects that on November 30, 1976, Kirk D. Elias (hereinafter defendant) was arraigned on an information charging him with two counts of delivery of a controlled substance, percodan. The information also alleged that the defendant was a repeater as prescribed by sec. 939.62(1)(c), Stats., Increased penalty for habitual criminality. On the same date the defendant was also arraigned on two other informations charging (1) possession of heroin, (2) delivery of biphetamine and (3) an additional count of delivery of percodan. Each of the informations alleged that the defendant was a repeater as defined by sec. 939.61(1)(c). The defendant pleaded not guilty.
On March 4, 1977, the defendant again appeared in trial court and the court was advised that a plea agreement had been reached by the defendant and the state. The essence of the plea agreement was that the defendant would plead guilty to one count of delivery of a controlled *281 substance: percodan, a narcotic drug, contrary to secs. 161.16(2)(a) and 161.41(1)(a), Stats., whereupon the state would move to dismiss the other pending criminal charges.
The defendant thereupon entered a plea of guilty to one count of delivery of percodan. The maximum penalty for this offense is a fine of not more than $25,000 or imprisonment for not more than 15 years, or both. The plea was accepted by the trial court and the defendant found guilty of the charge as alleged in the information. The remaining pending charges against the defendant were dismissed and the trial court ordered a presentence investigation.
A sentencing hearing was held on April 26, 1977, at which the defendant, his employer, and an employee of the Wisconsin Correctional Service testified. At the conclusion of the sentencing hearing the trial court imposed a sentence of an indeterminate term not to exceed six years, and gave the defendant credit for presentencing incarceration.
On this review, as in his postconviction motion before the trial court, the defendant argues that the trial court abused its discretion by considering improper factors when imposing the sentence. Therefore, the defendant argues the sentence should be vacated and the cause remanded for resentencing, or in the alternative, this court should modify the sentence.
[1-3]
This court has held that it will review sentences to determine whether there has been an abuse of discretion; "[h]owever, such questions will be treated in light of a strong policy against interference with the discretion of the trial court in passing sentence." Briggs v. State, 76 Wis.2d 313, 335, 251 N.W.2d 12 (1977); Ocanas v. State, 70 Wis.2d 179, 183, 233 N.W.2d 457 (1975). In reviewing a sentence to determine whether or not *282 discretion has been abused, the court will start with the presumption that the trial court acted reasonably, and the defendant must show some unreasonable or unjustifiable basis in the record for the sentence complained of. Krueger v. State, 86 Wis.2d 435, 444, 272 N.W.2d 847 (1979); Harris v. State, 78 Wis.2d 357, 371, 254 N.W.2d 291 (1977); State v. Killory, 73 Wis.2d 400, 408, 243 N.W.2d 475 (1976); Jung v. State, 32 Wis.2d 541, 548, 145 N.W.2d 684 (1966). An abuse of discretion may be found where the trial court relied upon factors which are totally irrelevant or immaterial to the type of decision to be made. Harris v. State, supra, at 370; Bruneau v. State, 77 Wis.2d 166, 176, 252 N.W.2d 347 (1977); Holmes v. State, 76 Wis.2d 259, 274, 251 N.W.2d 56 (1977); Ocanas v. State, supra, at 187.
There is no serious contention that the presentation of the state failed to conform with the plea agreement between the defendant and the state.
At the sentencing, counsel for the defendant made a strong plea for probation, basing the plea primarily upon the state of the defendant's health and his self-rehabilitation. After considering many factors, all appropriate, the trial judge ultimately concluded that incarceration was the proper disposition.
The defendant contends in general that the trial court abused its discretion in considering, for sentencing purposes, five charges which were dismissed, which included a felony jail escape charge. There is no specific reference to four of the dismissed charges. However, the defendant places particular emphasis on his contention that the trial judge considered the dismissed heroin charge. We find no merit in this argument.
This argument of the defendant is based upon an observation about possession of heroin made by the trial judge at the sentencing hearing when pronouncing sentence. Obviously, the trial judge was aware of the *283 charges that were dismissed. Furthermore, the agent for the Wisconsin Correctional Service testified, as a witness for the defendant, that the defendant had a substantial heroin use two or three months prior to his arrest in this case and that he was "speed balling" or using codeine with heroin. The defendant himself admitted experimenting with marijuana and LSD and also admitted using heroin. The record reflects that the dismissal of the charges was based, at least in part, upon search and seizure challenges that concerned the state. It appears there was a probability the defendant's car may have been searched after the defendant was in custody and while the automobile was in the possession of the sheriff.
When evaluating various factors in arriving at the ultimate sentence, the trial judge stated that a plea arrangement was usually based upon the dismissal of other charges and what was done in this case was not unusual; that the potential penalty was greatly reduced and that the defendant may have had prescriptions for medicine and that if the search was illegal there was still no way a person could legally possess heroin; that the agent of the Wisconsin Correctional Service had testified that this was not an isolated circumstance and the defendant had a long history of drug abuse. The court concluded that the information before it concerning the defendant's character and behavior reflected a complete failure of rehabilitation. The trial judge recognized that the defendant had been previously put on probation, had been sentenced to prison and subsequently paroled, and that the instant offense took place while the defendant was on parole.
There is no substance to the argument that the trial judge based the sentence on the fact that the defendant had been charged with the possession of heroin. The sentence imposed was based upon the evidence presented *284 at the sentencing hearing. Based upon this evidence the trial court concluded that the pattern of behavior of the defendant demonstrated that there were no mitigating circumstances involved in the crime for which he was convicted, and that the defendant was not a proper candidate for probation.
[4]
The primary factors to be considered in imposing sentence are the gravity of the offense, the character of the offender, and the need for protection of the public. Anderson v. State, 76 Wis.2d 361, 364, 251 N.W.2d 768 (1977); Harris v. State, 75 Wis.2d 513, 519, 250 N.W.2d 7 (1977); Rosado v. State, 70 Wis.2d 280, 291, 234 N.W.2d 69 (1975); McCleary v. State, 49 Wis.2d 263, 274-276, 182 N.W.2d 512 (1971).
[5]
This court has stated that the trial court in imposing sentence for one crime can consider other unproven offenses, since those other offenses are evidence of a pattern of behavior which is an index of the defendant's character, a critical factor in sentencing. Mallon v. State, 49 Wis.2d 185, 192, 181 N.W.2d 364 (1970); Waddell v. State, 24 Wis.2d 364, 368, 129 N.W.2d 201 (1964). See also: Embry v. State, 46 Wis.2d 151, 157, 174 N.W.2d 521 (1970). This court held in Grant v. State, 73 Wis.2d 441, 243 N.W.2d 186 (1976) that the trial court could consider offenses which were uncharged and unproven. The trial court can also consider pending charges for which there has been no conviction. Murphy v. State, 75 Wis.2d 522, 531, 249 N.W.2d 779 (1977); Handel v. State, 74 Wis.2d 699, 247 N.W.2d 711 (1976); Brozovich v. State, 69 Wis.2d 653, 661, 230 N.W.2d 639 (1975); Brown v. State, 52 Wis.2d 496, 500, 190 N.W.2d 497 (1971).
In Brozovich v. State, supra, at 661, this court held:
". . . [E]ven if the trial court took the pending charges into consideration in imposing sentence, under *285 the decisions of this court it was entitled to do so. This court in Waddell v. State,[1] stated that the state attorney:
"`. . . may properly use information relating to complaints of other offenses in his argument on sentence. These complaints are evidence of a pattern of behavior which, in turn, is an index of the defendant's character, a critical factor in sentencing.'"
[6, 7]
The responsibility of the sentencing court is to acquire full knowledge of the character and behavior pattern of the convicted defendant before imposing sentence. At the sentencing stage of a criminal proceeding there is no way that pertinent factors relating to the defendant's character and behavioral pattern can be immunized by a plea agreement between the defendant and the state.
Furthermore, we believe the holdings of this court on this issue are in accord with the holdings of the federal courts. In United States v. Majors, 490 F.2d 1321, 1324 (10th Cir. 1974), cert. denied, 420 U.S. 932 (1975), the court held:
". . . The dismissed indictment and the charge contained in it are within the kind of information which a court may properly consider in passing sentence. The plea bargain and the indictment dismissal resulting from it did not and, indeed, could not, deprive the judge of the right and probably the duty of giving consideration to it. . . ."
And in United States v. Martinez, 584 F.2d 749, 750 (5th Cir. 1978), the court held:
"The district court did not err in taking notice of the factual basis of the dismissed counts in determining sentence. To hold otherwise would be to hold that the circumstances of the other counts' dismissal somehow sanitized the facts upon which they were based, so that the court could consider some but not all of the defendant's life situation in determining a proper individual sentence for him. . . ."
*286 The defendant's reliance on Shavie v. State, 49 Wis.2d 379, 182 N.W.2d 505 (1971) is misplaced. Shavie holds that if the plea agreement includes an understanding between the parties that the trial judge may consider certain uncharged offenses at the time of sentencing, the details thereof should be made a matter of record before the trial judge accepts the plea of guilty. It does not stand for the proposition that a plea agreement between the defendant and the state can in any way circumscribe the discretion of the trial judge to consider relevant factors when imposing sentence. In fact, any purported plea agreement which was intended to so circumscribe the responsibility of the trial judge would be of questionable propriety.
[8-10]
We conclude that the trial judge did not base the sentence imposed upon the defendant's alleged possession of heroin. Also when imposing the sentence the trial judge did not consider irrelevant, immaterial or improper factors. The trial judge did not abuse his discretion.
By the Court.Order affirmed.
BEILFUSS, C. J., took no part.
NOTES
[1]  Waddell v. State, supra, at 368.
