
704 N.E.2d 690 (1998)
301 Ill. App.3d 37
235 Ill.Dec. 117
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Ronald COLEMAN, Defendant-Appellant.
No. 1-97-1456.
Appellate Court of Illinois, First District, Second Division.
November 10, 1998.
*692 Larry G. Axelrood, Catharine D. O'Daniel, Chicago, for Defendant-Appellant.
Richard A. Devine, State's Attorney of Cook County, Chicago (Renee Goldfarb, William Toffenetti and Jeannie Romas, Assistant State's Attorneys, of counsel), for Plaintiff-Appellee.
Justice COUSINS delivered the opinion of the court:
Defendant, Ronald Coleman, was indicted for possession with intent to deliver a substance containing cocaine, possession with intent to deliver 15 grams or more, but less than 100 grams, of a substance containing heroin, and possession with intent to deliver a substance containing marijuana. Following a bench trial, defendant was convicted of possession with intent to deliver 15 grams or more, but less than 100 grams, of a substance containing heroin. On February 20, 1997, defendant was sentenced to six years in the Illinois Department of Corrections. On appeal, defendant contends that: (1) he was not convicted beyond a reasonable doubt for possession of a controlled substance with intent to deliver; (2) defendant received ineffective assistance of counsel where trial counsel stipulated to positive results of laboratory tests for heroin in an amount that was much greater than the amount actually tested; and (3) the trial court abused its discretion in denying defendant's motion to vacate the stipulation to 70.2 grams of heroin.

BACKGROUND
Prior to trial, defendant filed a motion to quash his arrest and suppress evidence. At the hearing on defendant's motion, Teesha Coleman, a codefendant, testified that on May 9, 1994, she arrived at 5500 South Shore Drive, apartment 409, between 7 p.m. and 7:15 p.m. Coleman was in the apartment with defendant, Lucille Hampton, Michelle Searcy, Leroy Peterson, and Kenneth Bell. Between the time Coleman arrived at the apartment until approximately 12:15 a.m., she and the others were telling jokes, playing cards, and watching the Gacey execution on television. At approximately 12:15 a.m., Peterson, Coleman, Searcy, Hampton, and Bell were in the process of leaving the apartment to get something to eat and were standing near the door. Defendant was in the kitchen turning off the lights. Peterson touched the doorknob to walk out and the lock on the door made a clicking sound. After the door was unlocked, four police officers rushed into the apartment with guns in their hands and instructed everyone to get down on the floor. No one in the apartment opened the door for *693 the police or gave them permission to enter, and the police had neither search nor arrest warrants. When police officer Paul Chester came into the apartment, he shoved the door open and knocked Peterson to the floor. Everyone else was also put on the floor. After searching the apartment, the police recovered narcotics from under a cocktail table and arrested all six of the occupants.
Defendant testified consistently with Coleman's testimony and noted that, at 12:15 a.m., he was in the kitchen of the apartment when he heard someone tell him to freeze and get down. Defendant asserted that he did not have narcotics in his jacket when the police entered the apartment, and he never gave his consent or permission for the officers to enter the apartment.
Vincent Avery, a Chicago police officer assigned to the gang tactical unit, testified that on May 10, 1994, he and his partner, police officer Paul Chester, were on patrol in the area of 5500 South Shore Drive. Avery received a radio call regarding narcotics being sold at 5500 South Shore Drive, apartment 409. After entering the building and locating apartment 409, Avery heard loud music, television, male and female voices discussing narcotics dealings and packaging, and the purchases these individuals planned to make with their narcotics proceeds. Based upon these conversations, Avery went to the first floor to radio for backup help.
After two additional police officers arrived, the three officers returned to the fourth floor and listened outside the apartment with Chester for approximately 45 minutes. Officers Avery and Chester were to the left of the door and the backup officers were to the right of the door. Avery observed the doorknob move and defendant took a step outside of the door turning to tell someone to lock the door behind him. When the defendant's body turned, Avery observed a plastic bag protruding from his coat pocket. Suspecting narcotics, police officer Avery grabbed defendant by the arm and pinned him against the wall. Thereafter, he observed a similar bag in the opposite pocket.
Police officer Chester's testimony was similar to Officer Avery's. In addition to relating the same sequence of events up to when the officers entered the apartment, Chester testified that he observed a clear plastic bag protruding from defendant's pockets that was similar to bags later found on the cocktail table inside the apartment. He indicated that he observed narcotics activity from outside the threshold of the door and, thereafter, he and the other officers recovered narcotics from plain view on the cocktail table. Subsequently, they arrested the other five individuals inside the apartment.
Following argument, defendant's motion to quash his arrest and suppress evidence was granted in part and denied in part. The trial court observed that the warrantless search of the apartment was based upon neither probable cause nor exigent circumstances and, therefore, suppressed all of the evidence seized in the apartment as to defendant. However, the court felt that the police officer's testimonies regarding narcotics recovered from defendant's person outside of the apartment were believable; therefore, the State had the right to present evidence to that effect.
A bench trial took place on December 3, 1996. The State presented police officers Avery and Chester as witnesses. Officer Avery testified consistently with his previous testimony at the suppression hearing. However, Chester admitted that he did not personally observe anything protruding from defendant's pockets. Rather, once Avery had defendant pinned against the wall, he stepped around them and entered the apartment.
Following the State's presentation of witnesses, the following stipulation was entered:
"MS. HUGHES: Judge, against the Defendant Ronald Coleman, it is stipulated between and by the parties that the chain of custody was at all times properly kept and preserved, recovered evidence inventoried under No. 1321885, that Thomas Halloran is and would be qualified to testify as an expert and to render an expert opinion that within a reasonable degree of scientific certainty in the field of forensic chemistry that said expert did analyze and weigh the evidence inventoried as indicated above, properly employing tests and procedures *694 properly recognized and accepted in the scientific community for ascertaining the presence of a controlled substance.
That in doing so, said expert found the evidence in this case to be positive for heroin in the amount of 70.2 grams. So stipulated?
MR. MARK SOLOCK: So stipulated."
The trial court further allowed defendant to enter the transcripts from the suppression hearing into evidence for cross-examination and during his case in chief. Following arguments, defendant was acquitted of the cocaine and marijuana charges, but convicted of possession of heroin with intent to deliver.
On February 14, 1997, defendant filed a motion for a new trial. Defendant also filed a motion to reopen trial evidence to show that an automatic door-locking device was present on the door of the apartment, which was granted. However, after presenting the additional evidence, defendant's motion for new trial was denied.
On February 20, 1997, defendant was sentenced to six years in the Illinois Department of Corrections. Defendant appeals.
We reverse and remand.

OPINION

I
Defendant first contends that he was not convicted beyond a reasonable doubt of the offense of possession of a controlled substance with intent to deliver. Specifically, he asserts that: (1) the testimony of the State's witnesses, police officers Paul Chester and Vincent Avery, was inconsistent, severely impeached, and contrary to human experience; and (2) the State failed to prove that the substance seized by police was in excess of 15 grams of a substance containing heroin where the stipulation to the weight of the heroin was erroneous and where there was no evidence that substances from both bags recovered from defendant's person were tested for the presence of heroin.

A
The appropriate standard of review of this issue was established by Jackson v. Virginia, 443 U.S. 307, 99 S.Ct. 2781, 61 L.Ed.2d 560 (1979), and adopted by our supreme court in People v. Young, 128 Ill.2d 1, 131 Ill.Dec. 86, 538 N.E.2d 461 (1989). The supreme court noted that, in resolving a challenge to the sufficiency of the evidence used to convict a defendant, a reviewing court does not reweigh the evidence. Young, 128 Ill.2d at 49, 131 Ill.Dec. 86, 538 N.E.2d at 472. Rather, it resolves such a challenge by determining whether, after viewing all of the evidence in the light most favorable to the prosecution, any rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt. Young, 128 Ill.2d at 48-49, 131 Ill.Dec. 86, 538 N.E.2d at 472, citing Jackson, 443 U.S. at 318-19, 99 S.Ct. at 2788-89, 61 L.Ed.2d at 573-74.
Where inconsistencies and conflicts exist in the evidence, the trier of fact has the responsibility of weighing the credibility of the witnesses and resolving these conflicts and inconsistencies. People v. Williams, 200 Ill.App.3d 503, 514, 146 Ill.Dec. 298, 558 N.E.2d 261, 268 (1990). "This familiar standard gives full play to the responsibility of the trier of fact fairly to resolve conflicts in the testimony, to weigh the evidence, and to draw reasonable inferences from basic facts to ultimate facts." Jackson, 443 U.S. at 318-19, 99 S.Ct. at 2788-89, 61 L.Ed.2d at 573-74. In a bench trial, this responsibility rests with the trial court, and a reviewing court will not substitute its judgment for that of the trier of fact on questions involving the weight of the evidence or the credibility of witnesses. Young, 128 Ill.2d at 51, 131 Ill.Dec. 86, 538 N.E.2d at 474; Williams, 200 Ill.App.3d at 514, 146 Ill.Dec. 298, 558 N.E.2d at 268. Thus, this court shall not disturb the findings of the trier of fact unless the evidence is "so palpably contrary to the verdict or so unreasonable, improbable or unsatisfactory as to create a reasonable doubt of [the defendant's] guilt." People v. Abdullah, 220 Ill. App.3d 687, 693, 163 Ill.Dec. 116, 581 N.E.2d 67, 72 (1991). This rule is not inflexible, however. Where the record does not support the factual determinations, a court of review must reverse. People v. McCarthy, 102 Ill.App.3d 519, 522, 58 Ill.Dec. 193, 430 N.E.2d 135, 137 (1981).
*695 In the case sub judice, defendant contends that the testimonies of police officers Avery and Chester were inconsistent, severely impeached, and contrary to human experience. He further contends that the trial court erred in accepting their testimonies as credible at trial in light of its prior ruling that Chester was untruthful. However, police officer Avery testified that he observed defendant with a plastic bag protruding from his pocket when he exited the apartment. Suspecting narcotics, he pinned the defendant against the wall and observed a similar bag in the opposite pocket. Subsequently, Avery recovered an estimated 70.2 grams of heroin from the two plastic sandwich bags, each with 200 smaller "baggies" inside. This evidence, coupled with the stipulation to the amount of heroin, led the court to believe that defendant was guilty of possession of a controlled substance of greater than 15 grams but less than 100 grams with intent to deliver.
Although both police officers were impeached throughout their testimonies regarding collateral matters (including whether loud music, television or conversation could be heard from the hallway, whether defendant was "Mirandized" and invoked his fifth amendment right on the scene, whether defendant exited the apartment or had a foot outside the door, the identity of the individual who exited the apartment with defendant, whether Chester announced his office before he entered the apartment, whether the officers that participated in defendant's arrest reviewed the facts of the arrest before preparing their reports, the amount of time Chester waited in the hall before entering the apartment, and what the officers could observe from the threshold of the door), the evidence presented regarding the narcotics recovered from defendant's person was not impeached. Where discrepancies in the testimony of a witness relate only to collateral matters, they need not render the testimony of the witness on material issues improbable or incredible. People v. Brown, 150 Ill. App.3d 535, 539, 103 Ill.Dec. 809, 501 N.E.2d 1347, 1350 (1986). Defendant contends, however, that his testimony at the suppression hearing coupled with Teesha Coleman's account of the incident, that defendant was arrested in the kitchen of the apartment and that no one had left the apartment carrying narcotics at the time the police officers entered, undermines the police officers' credibility. It has long been held that the testimony of accomplices, as participants in the crime, must be examined carefully and cautiously, as their statements are looked upon with distrust on review. People v. Lindgren, 79 Ill.2d 129, 142, 37 Ill.Dec. 348, 402 N.E.2d 238, 245 (1980), citing People v. Wilson, 66 Ill.2d 346, 5 Ill.Dec. 820, 362 N.E.2d 291 (1977).
Although Coleman's arrest was quashed and the evidence recovered suppressed, the trier of fact is still entitled to believe or reject the defendant's testimony. Abdullah, 220 Ill.App.3d at 693, 163 Ill.Dec. 116, 581 N.E.2d at 72. It is not the function of a reviewing court to retry the defendant based on conflicting evidence. People v. Sanchez, 115 Ill.2d 238, 281, 104 Ill.Dec. 720, 503 N.E.2d 277, 294 (1986). Where the evidence is not so palpably contrary to the adjudication of guilt or so unreasonable, improbable or unsatisfactory as to create a reasonable doubt of the defendant's guilt, the trial court's decision should stand. See Abdullah, 220 Ill.App.3d at 693, 163 Ill.Dec. 116, 581 N.E.2d at 72.

B
Defendant next contends that the State failed to prove defendant guilty beyond a reasonable doubt of possession with intent to deliver heroin in an amount greater than 15 grams. It is a general rule that an objection to the introduction of evidence must be made at the time of admission or it will be treated as waived. People v. Baynes, 88 Ill.2d 225, 230, 58 Ill.Dec. 819, 430 N.E.2d 1070, 1072 (1981). Moreover, a defendant is precluded from attacking or otherwise contradicting any facts to which he has previously stipulated. People v. Gibson, 287 Ill. App.3d 878, 880, 223 Ill.Dec. 234, 679 N.E.2d 419, 421 (1997), citing People v. Polk, 19 Ill.2d 310, 315, 167 N.E.2d 185, 188 (1960).
In the present case, the parties stipulated to 70.2 grams of heroin recovered and subsequently tested by the police officers. However, *696 the defendant contends that at the time of trial, the only laboratory report he possessed indicated a confirmatory test which was positive for 7.02 grams of heroin. A second laboratory report existed which indicated a positive test for slightly more than 15 grams of heroin; however, the defendant contends that neither he nor the other attorneys were tendered the second report.
Generally, whether the substance in issue contains a controlled substance is a question for the trier of fact, in this case the trial court. Williams, 200 Ill.App.3d at 514, 558 N.E.2d at 268; People v. Kaludis, 146 Ill.App.3d 888, 893, 100 Ill.Dec. 382, 497 N.E.2d 360, 363 (1986). Where there is a lesser included offense for possession of a smaller amount of a controlled substance, the weight of the substance containing a drug is an essential element of a possession charge; therefore, the "weight of the substance containing the drug must * * * be proved beyond a reasonable doubt." People v. Hill, 169 Ill.App.3d 901, 911, 120 Ill.Dec. 574, 524 N.E.2d 604, 611 (1988). A reviewing court will not reverse the determination of the fact finder unless it is clearly against the manifest weight of the evidence. Hill, 169 Ill.App.3d at 911, 120 Ill.Dec. 574, 524 N.E.2d at 611.
In support of a posttrial motion for a new trial, the defendant referred to People v. Jones, 174 Ill.2d 427, 221 Ill.Dec. 192, 675 N.E.2d 99 (1996). In Jones, our supreme court held where separate bags or containers of suspected drugs are seized, a sample from each bag or container must be conclusively tested to prove that it contains a controlled substance. Jones, 174 Ill.2d at 429, 221 Ill. Dec. 192, 675 N.E.2d at 101; see also Hill, 169 Ill.App.3d at 911, 120 Ill.Dec. 574, 524 N.E.2d at 611. Although a chemist need only test random samples in order to be qualified to render an opinion as to the makeup of the entire substance before him (Kaludis, 146 Ill.App.3d at 894, 100 Ill.Dec. 382, 497 N.E.2d at 364), random testing is permissible when the seized samples are sufficiently homogenous so that one may infer beyond a reasonable doubt that the untested samples contain the same substance as those that are conclusively tested. Hill, 169 Ill. App.3d at 912, 120 Ill.Dec. 574, 524 N.E.2d at 612. Further, defendants' convictions have been reduced where experts have testified that they subjected fewer than all of the bags or containers weighed to a reliable and conclusive test for the presence of a particular substance. See People v. Ayala, 96 Ill. App.3d 880, 52 Ill.Dec. 446, 422 N.E.2d 127 (1980); People v. Games, 94 Ill.App.3d 130, 49 Ill.Dec. 666, 418 N.E.2d 520 (1981); People v. Hill, 169 Ill.App.3d 901, 120 Ill.Dec. 574, 524 N.E.2d 604 (1988).
In our view, Jones would be apposite had defendant stipulated to 7.02 grams of heroin rather than to 70.2 grams of heroin. However, the stipulation to 70.2 grams in the instant case had the effect of eliminating proof that otherwise might have been required. "Generally speaking, a defendant is precluded from attacking or otherwise contradicting any facts to which he has previously stipulated." Gibson, 287 Ill.App.3d at 880, 223 Ill.Dec. 234, 679 N.E.2d at 421, citing Polk, 19 Ill.2d at 315, 167 N.E.2d at 188. As a result, based upon the stipulation, we cannot hold that the State failed to prove defendant guilty beyond a reasonable doubt of possession with intent to deliver heroin in an amount greater than 15 grams.

II
Defendant next contends that he received ineffective assistance of counsel where the trial counsel stipulated to positive results of laboratory tests for the presence of heroin in a weight much greater than that which was actually tested. Under the standards enunciated by the United States Supreme Court in Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984), a claim of ineffective assistance of counsel will be sustained if counsel has failed to perform in a reasonably effective manner and there is a reasonable probability that, but for this substandard performance, the outcome of the proceedings would have been different. Strickland, 466 U.S. at 694, 104 S.Ct. at 2068, 80 L.Ed.2d at 698. Illinois brought its standards for review of ineffective counsel claims in line with Strickland in People v. Albanese, 104 Ill.2d 504, 85 Ill.Dec. 441, 473 N.E.2d 1246 (1984).
*697 In adopting Strickland, our supreme court recognized that the party alleging ineffective assistance of counsel bears a heavy burden to overcome a strong presumption in favor of finding that counsel's advocacy was not ineffective. Albanese, 104 Ill.2d at 525-26, 85 Ill.Dec. 441, 473 N.E.2d at 1255. Specifically, the defendant must show "that his counsel made errors so serious, and his performance was so deficient, that he was not functioning as the `counsel' guaranteed the defendant by the sixth amendment to the United States Constitution, and * * * that these deficiencies so prejudiced the defendant as to deprive him of a fair trial, a trial whose result is reliable." People v. Caballero, 126 Ill.2d 248, 259-60, 128 Ill.Dec. 1, 533 N.E.2d 1089, 1091 (1989).
The determination of reasonableness of trial counsel's actions must be evaluated from counsel's perspective at the time of the alleged error, without hindsight, in light of the totality of the circumstances and not just on the basis of isolated acts. In re D.M., 258 Ill.App.3d 669, 674, 197 Ill.Dec. 338, 631 N.E.2d 341, 344 (1994); People v. Ayala, 142 Ill.App.3d 93, 99-100, 96 Ill.Dec. 340, 491 N.E.2d 154, 158 (1986); Albanese, 104 Ill.2d at 525, 85 Ill.Dec. 441, 473 N.E.2d at 1255. "The ultimate goal in any evaluation of counsel's performance is to determine whether the performance has resulted in a breakdown in the adversarial process that our system relies upon for just results." People v. Whittaker, 199 Ill.App.3d 621, 627, 145 Ill.Dec. 698, 557 N.E.2d 468, 471 (1990).
Pursuant to defendant's motion for discovery, he was tendered a laboratory report, which listed an inventory number of 1321885. The report indicated that: (1) the total number of items received by the laboratory was 400; (2) the total estimated weight of those items was 70.2 grams; (3) the total of the items tested was 40; and (4) the total weight tested was 7.02 grams. At the close of the State's case in chief, counsel for the defendant stipulated that Thomas Halloran was an expert who found the evidence to be positive for heroin in the amount of 70.2 grams of heroin rather than the 7.02 grams actually tested. Thereafter, defendant was convicted of possession of a controlled substance with intent to deliver 15 grams or more, but less than 100 grams, of a substance containing heroin.
At defendant's hearing on the motion for new trial, counsel for defendant adopted codefendant Searcy's reasoning regarding why his stipulation should be vacated. After discussing the fact that four lawyers representing different defendants in the case all stipulated to amounts of narcotics recovered from the scene, the court declined to vacate the stipulations or reconsider its rulings and stated that defendant was proven guilty beyond a reasonable doubt of possession of a controlled substance over 15 grams.
It is unequivocal that the use of stipulations, in and of itself, does not establish ineffective assistance of counsel. In re D.M., 258 Ill.App.3d at 674, 197 Ill.Dec. 338, 631 N.E.2d at 345. Moreover, choices that are made on the basis of strategic considerations after a thorough investigation of all matters relevant to plausible options have traditionally been considered to be unchallengeable. Strickland, 466 U.S. at 690, 104 S.Ct. at 2066, 80 L.Ed.2d at 695. Accordingly, a claim of incompetency arising from a matter of trial strategy generally will not support a claim of ineffective representation. Whittaker, 199 Ill.App.3d at 629, 145 Ill.Dec. 698, 557 N.E.2d at 472.
In our view, however, trial counsel's decision to stipulate was erroneous. At the hearing on the motion for a new trial, the State agreed that a second laboratory report existed indicating a weight of slightly over 15 grams of heroin. Trial counsel stipulated to an amount more than what was actually tested, and defendant was found guilty of possession of a controlled substance containing more than 15 grams but less than 100 grams of heroin. If trial counsel had declined to stipulate to 70.2 grams, the State may or may not have taken steps to present testimony regarding the test for heroin.
An instructive case is People v. Shepherd, 242 Ill.App.3d 744, 183 Ill.Dec. 816, 612 N.E.2d 73 (1993). In Shepherd, the defense counsel entered into a stipulation that the bullet recovered from the victim's body could have been fired from the gun recovered from defendant's glove compartment. Following a bench trial, defendant was convicted of first *698 degree murder. On appeal, this court held that "[t]hough this incorrect stipulation may [have] constitute[d] a deficiency, defendant has failed to fulfill the second component of the Strickland, i.e., prejudice resulting from the deficiency." Shepherd, 242 Ill.App.3d at 748, 183 Ill.Dec. 816, 612 N.E.2d at 75. However, because the trial court did not consider the incorrect stipulation in arriving at a guilty verdict, the appellate court felt the error was nonprejudicial and accordingly harmless. Shepherd, 242 Ill.App.3d at 748, 183 Ill.Dec. 816, 612 N.E.2d at 76.
In our view, the stipulation in the instant case was untrue and was entered into erroneously as in Shepherd. However, unlike Shepherd, the trial judge considered and accepted the stipulation as to the weight of the narcotics in adjudging the defendant guilty of possession of more than 15 grams of heroin. Accordingly, the stipulation in this case prejudiced the defendant both as to the finding of guilt and subsequent sentence. Therefore, both Strickland proofs have been satisfied. See Strickland, 466 U.S. at 694, 104 S.Ct. at 2068, 80 L.Ed.2d at 698.

III
Defendant finally contends that the trial court abused its discretion in denying defendant's motion to vacate the stipulation to 70.2 grams of heroin.
Stipulations are looked upon with favor by courts since "they tend to promote disposition of cases, simplification of issues and the saving of expense to litigants." In re Estate of Moss, 109 Ill.App.2d 185, 192, 248 N.E.2d 513, 516 (1969). "Parties will not be relieved from a stipulation in the absence of a clear showing that the matter stipulated is untrue, and then only when the application is seasonably made." Brink v. Industrial Comm'n, 368 Ill. 607, 609, 15 N.E.2d 491, 492 (1938).
The laboratory report submitted to defendant prior to trial indicated that only 7.02 grams tested positive for the presence of heroin, yet counsel for the defendant stipulated to 70.2 grams. In ruling on defendant's motion for a new trial, the trial court noted:
"Number two, we're talking about the amounts of narcotics that were stipulated to by the attorneys. I have made my position clear in my discussions with Mr. Menaker [counsel for Searcy]. I could accept the argument if it was one lawyer. I can't accept it when it is four lawyers and especially the caliber of people who are appearing and appeared during the course of this case."
Based on the record, the trial court manifested concern regarding the stipulation to the testing of 70.2 grams of heroin when only 7.02 grams had been tested in stating, "I could accept the [defense] argument if it was one lawyer." In our view, the trial court's concern was warranted as the stipulation in the instant case amounted to ineffective assistance of counsel. As a result, we hold that the trial court abused its discretion in denying defendant's motion to vacate the stipulation that the test conducted by the chemist tested positive for 70.2 grams of heroin.
Accordingly, we vacate the judgment of the trial court and remand the case to the trial court for further proceedings consistent herewith.
Reversed and remanded.
McNULTY and RAKOWSKI, JJ., concur.
