
715 N.E.2d 252 (1999)
303 Ill. App.3d 583
239 Ill.Dec. 807
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Johnny JACKSON, Defendant-Appellant.
No. 4-97-0633.
Appellate Court of Illinois, Third District.
March 12, 1999.
Rehearing Denied April 22, 1999.
*253 Thomas A. Karalis, Office of the State Appellate Defender, Ottawa, for Johnny J. Jackson.
John X. Breslin, Deputy Director, State's Attorneys Appellate Prosecutor, Ottawa, Kevin Lyons, State's Attorney, Peoria, Dawn D. Duffy, State's Attorneys Appellate Prosecutor, Ottawa, for the People.
Justice LYTTON delivered the opinion of the court:
Following a jury trial, defendant Johnny Jackson was convicted of unlawful possession of a weapon by a felon (720 ILCS 5/24-1.1(a) (West 1996)) and sentenced to eight years' imprisonment. Defendant appeals, arguing that (1) the court erred in restricting evidence that defendant's confession was a product of police coercion; and (2) his sentence was an abuse of discretion. We affirm.


*254 FACTS
Prior to trial, defendant moved to suppress his confession on grounds that he did not receive proper Miranda warnings and his statements to the police were coerced. The trial court denied the motion, finding that defendant knowingly waived his Miranda rights and his statements were voluntary.
At trial, the State's case-in-chief consisted of the testimony of two eyewitnesses and the Peoria Police detective who took defendant's confession.
Dorothy Martin testified that she was defendant's girlfriend in December 1996. She shared an apartment with Kesha Washington. On the evening of December 30, 1996, Martin and Washington left their apartment with three young men to procure marijuana. They encountered a group of people, including defendant, that had gathered in the neighborhood. The women returned to their apartment.
Later that night, defendant arrived at the apartment. Eddie Walton, a friend of defendant, subsequently pulled up in a truck outside the apartment. Martin told defendant to tell Walton to leave the area. Defendant left. When he returned, he told Martin of a shooting in the neighborhood. Defendant told Martin that he was not involved in the shooting and told her to smell his gun, an automatic, to satisfy herself that it had not been fired. Dorothy testified that she was knowledgeable about guns and could tell from the smell that the gun had not been used.
The next morning, defendant went outside momentarily and tracked leaves on the floor when he came back in. Later, as she was making the bed they had slept in, Martin found another handgun, a revolver, wrapped in a sock under the bed. Defendant told her it was "dirty" and opened the gun to show her that it had one bullet missing. Martin said this gun was small and shiny, black or brown. She did not know what happened to the gun after that.
Kesha Washington testified that she saw defendant holding a sock under his shirt when he came into the apartment after talking to Walton. She said he walked through the apartment and placed the sock in a pile of leaves in the back yard. Washington also said she heard defendant say that he "did not shoot the boy." He then showed the women his gun and let them smell it before placing it in his waistband.
Detective Joe Youngman testified that he investigated the shooting death of Adrian Lobdell, which occurred in the early morning of December 31 at the housing complex where Martin and Washington lived. He said he took defendant into custody on January 3, 1997, as a suspect in the incident. At the time, defendant was not feeling good. After allowing him to sleep at the county jail, the officer began a series of interviews with defendant around noon the next day. Initially, defendant denied any knowledge about the shooting; however, around 10 p.m., defendant admitted that he had been in the neighborhood but he did not commit the offense. Youngman told his sergeant that he believed defendant was not the shooter, but he wanted more time for defendant to tell him who was.
After midnight, defendant told Youngman that he had been standing with a group of people when he saw Eddie Walton pull up in his Bronco. While defendant was sitting with Walton observing the crowd, he heard a shot, and then Charles Morris yelled, "Cisco!" Walton and defendant drove off, but later met up with Morris. Morris asked defendant to hide his gun. Morris explained that Tyrone Campbell, known as Cisco, had borrowed the gun earlier in the evening, and Morris assumed that it had been used in the shooting. Defendant described the gun as a shiny black .38 revolver, wrapped in a white sock with a bullet hole in it. Defendant told Youngman that he later buried the gun in the leaves behind Martin's apartment. The next morning, he retrieved it and returned it to Morris.
Youngman said he asked defendant if he had been carrying a gun that night. Defendant admitted he had carried a 9 millimeter semi-automatic pistol in his waistband. He said he told Martin to smell the pistol to prove that he had not been involved in the shooting. Youngman said that he believed defendant because he had earlier interviewed *255 Martin, and she had related the same incident. Youngman said Campbell was subsequently convicted of Lobdell's murder.
Prior to Youngman's cross-examination testimony, the prosecutor moved to preclude the defense from relitigating matters raised at the suppression hearing. The court denied the motion. When the case resumed, Youngman testified that defendant never asked to speak with an attorney, family or friends during the period of his custodial interrogation. The parties then stipulated that defendant had a prior felony conviction.
After the State rested, defendant testified that the police picked him up at a gas station around 10 p.m., saying that they wanted to talk to him about a murder case. Defendant said he was not given Miranda warnings. He told the officers he had a headache and wanted to talk to his attorney. The officers continued to interrogate defendant, even though he repeatedly told them he did not want to talk and wanted to call his attorney. When counsel attempted to probe defendant's attempts to obtain legal assistance during the custodial interrogation, the prosecutor objected on the ground that defense counsel was relitigating the motion to suppress. The court thereafter sustained the prosecutor's objections to further testimony in this regard. Defendant was also precluded from introducing defense counsel's business card, which defendant had on his person while in custody.
In rebuttal, the State recalled Detective Youngman, who stated that he did not feed defendant details about the murder prior to taking his statements. On cross-examination, Youngman reiterated that defendant never asked for the assistance of counsel before volunteering his statements to the police. However, when counsel asked Youngman whether defendant had shown him his attorney's business card and said he wanted a lawyer, the court sustained the prosecutor's objection. The jury found defendant guilty as charged, and the court subsequently sentenced him to an eight-year extended term of imprisonment.

I.

EVIDENCE OF POLICE COERCION
Defendant initially contends that the trial court erred in prohibiting him from introducing evidence that his confession was coerced. Relying on Crane v. Kentucky, 476 U.S. 683, 106 S.Ct. 2142, 90 L.Ed.2d 636 (1986), defendant claims that the court should have allowed testimony regarding defendant's request for assistance of counsel during custodial interrogation.
In Crane, the Supreme Court reversed the defendant's conviction because he was precluded from presenting testimony at trial that he was detained in a small, windowless room until he confessed. The Court noted that the circumstances surrounding the taking of a confession are relevant both to the legal issue of voluntariness of the confession and to the factual question of the defendant's guilt or innocence. To the extent that the circumstances bore upon the credibility and weight to be given the confession, such evidence should not have been precluded at trial. Crane, 476 U.S. at 689, 106 S.Ct. at 2146, 90 L.Ed.2d at 644.
Where the trial court's rulings restrict the right to present a defense or to cross-examine witnesses, our duty on review is to determine whether the trial court's rulings constituted an abuse of its discretion. People v. Peeples, 155 Ill.2d 422, 186 Ill.Dec. 341, 616 N.E.2d 294 (1993). Even if the court unduly restricts evidence of the circumstances of a confession, however, a new trial is not warranted if the error is harmless beyond a reasonable doubt. See People v. Williams, 230 Ill.App.3d 761, 172 Ill.Dec. 445, 595 N.E.2d 1115 (1992). An error that could not have affected the verdict does not result in prejudice to the defendant and may be deemed harmless. People v. Sims, 265 Ill.App.3d 352, 202 Ill.Dec. 577, 638 N.E.2d 223 (1994).
In this case, defendant's theory of defense at trial hinged upon testimony that he repeatedly requested and was denied an opportunity to confer with counsel before giving a statement to the police. Such testimony, according to defendant, showed that his confession was unreliable and did not *256 prove his guilt of unlawful possession of weapons. Although some limited testimony was admitted prior to the prosecutor's objections, we hold that the court did err when it restricted cross-examination of Detective Youngman and when it sustained the prosecutor's objection to defendant's own testimony. The jury had a right to weigh the credibility of defendant's confession along with the other evidence in the case. See Crane, 476 U.S. 683, 106 S.Ct. 2142, 90 L.Ed.2d 636.
Nevertheless, we hold that the error was harmless. The eyewitness evidence against defendant, corroborated in significant details by his own statements, overwhelmingly established that defendant knowingly possessed one or two guns the night of Lobdell's murder. Moreover, defendant stipulated to his status as a prior felon, the only other element of the State's case against him. 720 ILCS 5/24-1.1(a) (West 1996). Thus, even if the jury had received all of the evidence of the circumstances surrounding defendant's confession, it would not have returned a not guilty verdict. See Williams, 230 Ill.App.3d 761, 172 Ill.Dec. 445, 595 N.E.2d 1115. Accordingly, defendant is not entitled to a new trial.

II.

EXCESSIVE SENTENCING
Defendant next contends that his eight-year extended term sentence was excessive because of his youth and past hardships. He requests a reduction or remandment for a new sentencing hearing.
A sentencing court must consider the defendant's history, his character and his rehabilitative potential, as well as the seriousness of the offense, the need to protect the public and the need for deterrence and retribution. People v. Johnson, 223 Ill. App.3d 169, 165 Ill.Dec. 336, 584 N.E.2d 515 (1991). On review, it is presumed that the court considered all mitigating evidence absent some indication, other than the sentence itself, to the contrary. People v. McCarthy, 213 Ill.App.3d 873, 157 Ill.Dec. 755, 572 N.E.2d 1219 (1991). A trial court's sentencing decision is entitled to great weight and deference. People v. Perruquet, 68 Ill.2d 149, 11 Ill.Dec. 274, 368 N.E.2d 882 (1977). On review, this court will not substitute its judgment for that of the trial court. People v. Streit, 142 Ill.2d 13, 153 Ill.Dec. 245, 566 N.E.2d 1351 (1991). A sentence which falls within the statutory range will be upheld unless it is an abuse of discretion. Perruquet, 68 Ill.2d 149, 11 Ill.Dec. 274, 368 N.E.2d 882.
In this case, defendant's criminal record qualified him for extended-term sentencing. 730 ILCS 5/5-5-3.2(b)(1), 5-8-2(a)(5) (West 1996). The record shows that the trial court duly considered and properly balanced relevant sentencing factors. Defendant's criminal history and conduct while on parole demonstrate that he has little rehabilitative potential. The sentence imposed falls within the statutory extended-term range of 5 to 10 years and is not an abuse of the court's discretion.

CONCLUSION
The judgment of the circuit court of Peoria County is affirmed.
Affirmed.
HOLDRIDGE, P.J., and HOMER, J., concur.
