
52 Ill. App.3d 378 (1977)
367 N.E.2d 315
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
TOMMIE SPENCER, Defendant-Appellant.
No. 75-398.
Illinois Appellate Court  Fifth District.
Opinion filed August 22, 1977.
*379 Michael J. Rosborough, of State Appellate Defender's Office, of Mt. Vernon, and Randy E. Blue, research assistant, for appellant.
Clyde L. Kuehn, State's Attorney, of Belleville (Phyllis J. Perko and Martin P. Moltz, both of Illinois State's Attorneys Association, of counsel), for the People.
Judgment affirmed.
*380 Mr. JUSTICE JONES delivered the opinion of the court:
Defendant, Tommie Lee Spencer, was charged in the circuit court of St. Clair County with two counts of armed robbery. Following negotiations, defendant pleaded guilty to two counts of the reduced charge robbery. After a sentencing hearing, the court sentenced defendant to probation for a term of two years with periodic imprisonment on weekends at the county jail from 6 p.m. Friday until 6 a.m. Monday, and that defendant pay for his incarceration at a rate of $5 per day while so incarcerated. Subsequently, defendant's probation was revoked for his failure to comply with the periodic imprisonment terms of his probation and defendant was sentenced to a term of six to 18 years imprisonment on the underlying charge.
Defendant appeals contending that the sentence is excessive and that it was imposed, not for the original crime, but for the violation of the special conditions of the probation.
The charge against defendant stemmed from an incident in which defendant and an accomplice robbed two victims at gunpoint. During the course of the robbery, one of the victims was struck with the gun by defendant's accomplice. At the time the trial court imposed the sentence of probation, the court warned defendant that his failure to comply with the conditions of the probation would lead to the imposition of a severe sentence of imprisonment. Following the revocation of defendant's probation, the trial court commented on the warnings that it had given defendant at the time he was placed on probation.
 1 Supreme Court Rule 615(b)(4) (Ill. Rev. Stat. 1973, ch. 110A, par. 615(b)(4)) authorizes this court to reduce sentences imposed by the trial court. However, in order to do so we must find a manifest and arbitrary abuse of the trial court's discretion. Such an abuse will be found to exist if the sentence imposed is at variance with the purpose and spirit of the law, or greatly disproportionate to the nature of the crime. People v. Wright, 56 Ill.2d 523, 309 N.E.2d 537; People v. Willett (5th Dist. 1976), 44 Ill. App.3d 545, 358 N.E.2d 657; People v. Grau (5th Dist. 1975), 29 Ill. App.3d 327, 330 N.E.2d 530.
 2-5 It is fundamental that in determining what sentence to impose the court considers the history and character of the defendant in order to assess his rehabilitative potential. (See Ill. Rev. Stat. 1973, ch. 38, pars. 1005-8-1(c)(3) and 1005-6-1(a).) When a defendant who has been convicted of an offense is admitted to probation, and that probation is subsequently revoked, the court may resentence the defendant to any sentence that would have been appropriate for the original offense. (People v. Willett; People v. Elsner, 27 Ill. App.3d 957, 327 N.E.2d 592; People v. Bullion, 21 Ill. App.3d 297, 314 N.E.2d 731.) The sentence imposed upon revocation may not be punishment for the offense which *381 causes the revocation although the subsequent offense may be considered as constituting a part of defendant's history and character and his possibilities for rehabilitation. (People v. Willett; People v. Tatum, 29 Ill. App.3d 251, 330 N.E.2d 281; People v. Harden, 6 Ill. App.3d 172, 284 N.E.2d 716.) In imposing sentence the court must take full cognizance of all factors relevant to the rehabilitation potential of the defendant. The sentencing judge is not required to close his eyes to defendant's conduct while on probation which reflects on his possibilities for rehabilitation.
The facts of the crime are detailed above. The defendant could have been prosecuted on two counts of armed robbery and doubtless convicted. We surmise that it was because of defendant's age, 17 at the time of the offense, that the State agreed after negotiations to reduce the charges to two counts of robbery and consent to the punishment of probation with periodic imprisonment. Defendant rejected the opportunity extended, even after the warning given by the court, and disregarded the terms and conditions of his probation. He reported for his weekend incarceration only rarely and when he did report he was drunk. This conduct was definitely a part of the history and character of defendant and reflected adversely upon his potential for rehabilitation and the court properly could consider it in imposing sentence.
 6, 7 Since sentencing is primarily a function of the trial judge who sees the defendant and is in a superior position to appraise him and evaluate the likelihood of his rehabilitation, a reviewing court will not modify a sentence that is within statutory limits unless it is greatly at variance with the purpose and spirit of the law or greatly disproportionate to the nature of the crime. (People v. Wright; People v. Willett; People v. Grau.) We find no such departure present here. In addition to the two robberies for which sentence was imposed the court had for consideration the fact that defendant had been previously convicted of one felony (theft) and four misdemeanors, two of them for unlawful use of weapons, one for disturbing the peace and one for disorderly conduct. We will not disturb the sentence.
Affirmed.
KARNS, J., concurs.
Mr. JUSTICE EBERSPACHER, dissenting:
The record shows that at the time the trial judge resentenced defendant, he read in full to defendant a transcript of the remarks he had made when the original probation had been imposed. In so reading from that transcript, the judge stressed the fact that defendant had been promised a heavy sentence for violation of probation.
*382 The judge read that:
"`If you violate the provisions of your probation, I will see that you are brought back here and tried on the violation of probation.' Do you remember me telling you that?
Defendant Spencer: Yes, sir.
The Court: `Being late [in] getting to the jail can be one of those conditions. Not showing up at all is definitely one of those conditions, and I will see that you are incarcerated in person in Menard or some other penitentiary, and it would [not] be a period of one to three years." * * *
By thus reading from the transcript the trial judge was clearly reiterating the promise of a severe sentence for a probation violation. The judge then ordered defendant's probation revoked and promptly sentenced defendant. The judge then stated:
"[Y]ou arbitrarily decided you wouldn't appear any more [at jail on weekends]. You haven't paid any of the money, $5.00 a day for your keep of any of the weekends that you showed up and when you did show up, 1, 2, 3, 4, 5, 6 of the times, you showed up around being two and a half hours late and you were intoxicated each time when you showed up."
The judge made no reference to the nature and the circumstances of the original offense. His only comments were directed to two factors: (1) the promise of a heavy sentence for a violation of probation, and (2) the acts leading to the revocation. While consideration of the defendant's acts which were in violation of probation was relevant to the court's determination to revoke the probation, it is an unavoidable conclusion that the court also intended the severe sentence as direct punishment for those acts. The judge even appears to recognize that the record would reflect such a conclusion, when he states:
"If the Court wants any reviewing of the Court, fully and completely, consider the remarks of the Court both at the time of original sentencing and here today."
Consequently, while a sentence higher than the minimum would not be inappropriate for defendant, the trial judge made it amply clear that a severe sentence was imposed for the defendant's acts which led to a revocation, and which acts the trial court anticipated in granting probation at the time he accepted the negotiated plea on two armed robbery charges from a defendant who had previously had convictions on a felony theft charge and four misdemeanors, two of which were of a serious nature.
To me, this is rather conclusive of the court's abuse of discretion in sentencing which requires either a reduction or remand for resentencing under the proper standards.
