delivered the opinion of the court:
Defendant was convicted by a jury of the offenses of possession of cannabis, possession of cannabis with intent to deliver, and possession of a controlled substance (LSD). (Ill. Rev. Stat. 1983, ch. 56½ pars. 704(d), 705(d), 1402(b).) Judgment was entered on the latter two convictions. Defendant was sentenced to concurrent terms of four years’ probation on the conviction for possession of cannabis with intent to deliver, and 2½ years’ probation on the conviction of possession of a controlled substance. As a condition of each probation, she was ordered to serve six months in the county jail, with the first 30 days to be served forthwith, and the last five months to be served at the end of each probationary term, which could be vacated by the court upon its finding that there had been no violations of probation. The court further found the defendant in a position to pay costs of suit, and or*596dered her to do so during the four-year term of probation, including as a part of costs the court-appointed counsel fees of $2,230.34.
Defendant appeals from the judgment of the circuit court of Piatt County, arguing: (1) She was not proved guilty beyond a reasonable doubt; (2) she was denied a fair trial by the prosecutor’s comments in closing argument that the presumption of innocence lasted only “until we say different,” and argument of facts not in evidence; (3) the court erred in sentencing her to a term of probation in excess of that permitted for the offense of possession of cannabis with an intent to deliver; (4) the court abused its discretion in sentencing her to any term of imprisonment as a condition of her probation; and (5) the court erred in ordering recoupment under section 113—3.1(a) of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1983, ch. 38, par. 113—3.1(a)), by failing to conduct a hearing before ordering the payment, and in the absence of evidence demonstrating her “foreseeable ability to pay.”
Defendant’s reasonable doubt argument requires an excursus into the evidence adduced at trial. Following several drug purchases by an agent of the Illinois Division of Criminal Investigation from Jon Burke, defendant’s husband, a search warrant was executed at the Burke residence on the night of May 8, 1984. Defendant was home at the time of the search and authorities seized marijuana and drug paraphernalia from various parts of the house and a small brown vial from the freezer compartment of the refrigerator which contained a substance later identified as LSD. Defendant’s husband entered a negotiated plea of guilty to charges arising from the search, and was sentenced to two years’ imprisonment. At trial, David Crouch, special agent with the Illinois Division of Criminal Investigation, testified he was introduced to Jon Burke through a confidential source on March 15, 1984, and was invited to the Burke residence by Jon. Crouch observed the defendant, along with two others, sitting at the kitchen table. The individual accompanying Crouch asked defendant’s husband, in an average conversational tone and standing about three or four feet from the kitchen table, whether he had any cannabis. Defendant’s husband then took the two men into another room, where Crouch purchased LSD and the other individual bought cannabis.
Crouch testified he returned to the Burke residence on April 2, 1984, and was admitted by defendant’s husband. Crouch asked if he had any LSD, and Jon replied that he did not, but said he had some good cannabis. Crouch testified that he asked Jon if he could see it, and Jon went down the hallway to the living room area, returning within seconds, and laid four plastic bags of cannabis on the kitchen *597table. In the interim, Crouch testified he exchanged conversation with the defendant, who was stove-frying potatoes, about her cooking. After the cannabis was laid on the table, Crouch examined it and gave Jon $110. Crouch again asked Burke if he had any LSD, and Burke responded he did not, but turned to defendant and asked her if “Randy” had any, and defendant answered she did not know. Crouch then left.
Crouch testified that he returned to the Burke residence on May 8, 1984, and was admitted by Jon but did not see the defendant. He bought some cannabis, which was paid for with marked United States currency, which currency was recovered during the execution of the search warrant that night.
Officers testified about executing the search warrant including testimony that the brown vial containing the LSD was found in the foremost front of the freezer compartment of the refrigerator, near pizza and frozen meat. A photograph admitted as an exhibit showed the vial in plain view in the front portion of the freezer. Marijuana seeds, the remains of marijuana cigarettes, and drug paraphernalia were recovered from the kitchen area, the living room, and the bedroom. A scale for weighing marijuana was found in the kitchen cabinet with the dishes. Plastic bags containing cannabis were found in the master bedroom closet in association with both men’s and women’s clothing.
Assistant State’s Attorney Daniel Merriman and State’s Attorney Hugh Finson testified about certain statements made by the defendant to Finson on the morning of May 9, 1984. Defendant had accompanied her husband’s sister to Finson’s office to discuss the amount of Jon Burke’s bond. During the course of the discussion, defendant made statements to the effect that “we are just trying to get back on our feet,” and “we are just trying to make a life for ourselves.” Both Merriman and Finson testified to defendant’s use of the plural pronoun, “we,” in making these statements.
At the close of the State’s case, the court directed a verdict as to other charges on which defendant had been tried in connection with the first two drug sales to Crouch.
Defendant testified in her own behalf, and said her husband had been using marijuana for several years, and that he kept it in the house, in his closets and in the living room. She identified the photographs showing drugs found in the search as showing her husband’s side of the closet and his clothes, and not her own. According to her testimony, none of the drug-related materials testified to belonged to her, nor had they ever been used by her, including a colander or sifter *598which had been introduced into evidence. She said she did not use marijuana, but was aware of her husband’s use and sale of the substance. She said she did not approve of the conduct and had expressed her disapproval quite often in statements to him. Defendant testified that her husband had never furnished her with any of the money that he received from selling drugs, but acknowledged that he had used some of the money to pay rent. She also said he baby-sat their four-year-old child, as he was not working. She stated that she purchased most of the family food, clothing, and miscellaneous items from her earnings, having worked full time for three years.
Defendant testified that when she spoke to Finson on the morning of May 9, 1984, she had not been telling him that she was engaged in any illegal drug sales with her husband, but merely expressing her concern about the fact that her husband was in jail with a high bond, and that this would affect her ability to work.
Defendant testified that she had never seen the brown vial found in the freezer which contained LSD, although she acknowledged that she did use the freezer; and she said she knew of the presence of marijuana in the house.
Her testimony indicated her awareness that when Crouch came to the house in March 1984, the person accompanying him asked her husband if he had any marijuana. As to the April 1984 sale to Crouch, she denied having heard the conversation between Crouch and her husband, and said she did not recall her husband asking her about “Randy” or having made a response.
In rebuttal, an officer testified that the clothing had been removed from the closets in executing the search warrant, and that the items in compartments where the drugs were found were of different sizes, such that it was obvious that it was not one person’s clothing, as some items were smaller, such as would be worn by a woman.
Defendant argues she was not proved guilty beyond a reasonable doubt of the charged offenses. Her theory of the case is essentially that the substances found in the home were under the control of her husband, for his personal use and sale, and that she engaged in no affirmative act to aid, abet, or encourage his drug transactions. In People v. Nettles (1961), 23 Ill. 2d 306, 308-09, 178 N.E.2d 361, 363, the court stated that where narcotics are found on the premises under the control of the defendant, this fact, in and of itself, gives rise to an inference of knowledge and possession by him which may be sufficient to sustain a conviction for unlawful possession of narcotics, absent other facts and circumstances which might leave in the mind of the trier of fact a reasonable doubt as to his guilt. Defendant suggests *599that the inference of knowledge and possession referred to in Nettles is overcome by the circumstances here, indicating that she had mere knowledge of the presence of the contraband, but was not involved in the drug sales. We disagree.
This argument mistakes the role and function of inference as compared to evidence. “Inference” has been defined as:
“In the law of evidence, a truth or proposition drawn from another which is supposed or admitted to be true. A process of reasoning by which a fact or proposition sought to be established is deduced as a logical consequence from other facts, or a state of facts, already proved or admitted. Com. v. Whitman, 199 Pa. Super. 631, 186 A.2d 632, 633. Inferences are deductions or conclusions which with reason and common sense lead the jury to draw from facts which have been established by the evidence in the case.
An inference is a deduction of fact that may logically and reasonably be drawn from another fact or group of facts found or otherwise established in the action. Calif. Evid. Code.” (Black’s Law Dictionary 700 (5th ed. 1979).)
The fact that no evidence was presented as to the defendant’s actual physical possession of the contraband does not mean that the jury is precluded from drawing the requisite inferences of knowledge and possession to sustain a conviction for unlawful possession of marijuana or narcotics.
To sustain a charge of unlawful possession, the State is required to prove (1) knowledge of the possession of the substance, and (2) that it was in defendant’s control. (People v. Bell (1972), 53 Ill. 2d 122, 126, 290 N.E.2d 214, 216.) The requisite knowledge may be proved by evidence of acts, declarations, or conduct from which it may fairly be inferred that the accused knew of the existence of the narcotics at the place they were found. (People v. Bell (1972), 53 Ill. 2d 122, 290 N.E.2d 214; People v. Smith (1960), 20 Ill. 2d 345, 350-51, 169 N.E.2d 777, 781.) Not only may possession of drugs be constructive (see People v. Mack (1957), 12 Ill. 2d 151, 161-63, 145 N.E.2d 609, 612-13; People v. Brownstein (1982), 105 Ill. App. 3d 459, 465-66, 434 N.E.2d 505, 509-10; People v. Luetkemeyer (1979), 74 Ill. App. 3d 708, 713, 393 N.E.2d 117, 121), but the rule that possession must be exclusive does not mean that possession may not be joint (see People v. Embry (1960), 20 Ill. 2d 331, 169 N.E.2d 767; People v. Kline (1976), 41 Ill. App. 3d 261, 354 N.E.2d 46). See generally Annot., Conviction of possession of illicit drugs found in premises of which defendant was in nonexclusive possession, 56 A.L.R.3d 949 (1974); 9 *600Unif. Laws Annot. sec. 401 and notes thereto (1979).
As to the defendant’s contention that she denied any knowledge of the LSD found when the search warrant was executed, the jury is not required to believe the defendant. It is the function of the trier of fact to determine the credibility of the witnesses and the weight to be afforded their testimony, and the trier of fact may reject the explanations by which the defendant attempts to place himself beyond knowledge and possession of the contraband, and accept the prosecution’s evidence as true. (People v. Kline (1976), 41 Ill. App. 3d 261, 354 N.E.2d 46; People v. Mack (1957), 12 Ill. 2d 151, 163, 145 N.E.2d 609, 614.) Upon review, in a case involving some direct evidence, the only question is whether there is sufficient evidence, both credible and legally sufficient, to establish defendant’s guilt beyond a reasonable doubt; although different rules may adhere as to imputing constructive possession when the evidence is wholly circumstantial (see People v. Deatherage (1984), 122 Ill. App. 3d 620, 461 N.E.2d 631), or when the defendant is a visitor (see People v. Pugh (1967), 36 Ill. 2d 435, 223 N.E.2d 115; People v. Lenoir (1984), 125 Ill. App. 3d 260, 465 N.E.2d 1027). Moreover, it is noted that several Illinois cases involving contraband found in the accused’s car have found that that circumstance, and the fact that it was located in places where he “could or should have been aware” of it, were sufficient evidence of his knowledge and control in order to sustain convictions for unlawful possession of the contraband drugs. See People v. Davis (1965), 33 Ill. 2d 134, 139, 210 N.E.2d 530, 532; People v. Evans (1979), 80 Ill. App. 3d 87, 398 N.E.2d 1219; see also Barnhart v. State (Okla. Crim. App. 1977), 559 P.2d 451, 456-57.
Defendant also points to the fact that her husband pleaded guilty to charges of unlawful delivery of a controlled substance, unlawful delivery of cannabis, and unlawful possession of cannabis; however, as in Embry and Kline, this does not preclude the trier of fact from inferring joint possession.
As to assessing the sufficiency of the evidence on a charge of possession of a substance containing cannabis with intent to deliver, it must be recalled that, characteristically, a mental state is seldom subject of direct proof and must generally be inferred from circumstances which warrant the inference. (People v. Kline (1976), 41 Ill. App. 3d 261, 354 N.E.2d 46.) Although defendant does not argue that the doctrine of accountability (Ill. Rev. Stat. 1983, ch. 38, par. 5—2) is inapplicable to charges of possession of drugs or possession with intent to deliver, she maintains she ought not have been convicted under the accountability theory as presented by the State and instructed on. *601Here also she contends that the inference of her possession was rebutted by the overwhelming evidence of her husband’a participation in the drug business. She argues that her mere presence does not render her accountable for the offenses committed by her spouse, but rather that there must be proof (1) of the required intent and (2) that she aided, abetted, or attempted to aid her spouse in the perpetration of the offenses (People v. Evans (1981), 87 Ill. 2d 77, 429 N.E.2d 520); and that in the absence of evidence of an affirmative act showing that she assisted, abetted, or encouraged the commission of the offenses, she may not be treated as a principal on the basis of accountability. (People v. Shields (1955), 6 Ill. 2d 200, 127 N.E.2d 440.) Evans and Shields may be distinguished, as neither involved drug charges where-under possession, as an element of the offense, may be inferred from the fact that the drugs are found in the accused’s residence.
The State’s theory of the case was that of a family drug business, or what might be termed a “joint enterprise,” with elements of common design. (See, e.g., People v. Powers (1920), 293 Ill. 600, 127 N.E.2d 681 (robbery); People v. Taylor (1925), 319 Ill. 174, 149 N.E.2d 797 (larceny); see also People v. Walinsky (1921), 300 Ill. 92, 132 N.E.2d 757 (larceny and receiving stolen property).) In contrast to the “overt act” language in Shields, it has been held that although mere presence or negative acquiescence is not enough to make a person liable as a principal, one may aid or abet without actively participating by an overt act; and if the evidence shows that the defendant was present at the commission of a crime without disapproving or opposing it, it is permissible for the trier of fact to consider this conduct, in connection with other circumstances, so as to support the conclusion that the defendant assented to the commission of a crime, lending to it his countenance and approval, and was thereby aiding and abetting therein. (See People v. Lanzotti (1978), 61 Ill. App. 3d 451, 378 N.E.2d 369 (theft); People v. Barnes (1971), 2 Ill. App. 3d 461, 276 N.E.2d 509.) Further, it has been held that the trier of fact may infer an agreement which would support accountability for a criminal offense based upon the conduct of the accused in attaching himself to a group which combines to act in circumstances showing a common design to do unlawful acts to which a group assents. (See People v. Barber (1981), 93 Ill. App. 3d 911, 418 N.E.2d 439 (attempted armed robbery).) Whether the evidence shows proof of acts showing common purpose is a question for the trier of fact, and proof of such acts need not be supported by express words of agreement, but can be drawn from the circumstances surrounding the act. (See, e.g., People v. Kirkwood (1980), 82 Ill. App. 3d 252, 262, 402 N.E.2d *602677, 686 (armed robbery).) It is also noted that several cases have held that the intent to deliver element may be inferred from the quantity possessed (People v. Kline (1976), 41 Ill. App. 3d 261, 266, 354 N.E.2d 46, 51 (cannabis); People v. Munoz (1982), 103 Ill. App. 3d 1080, 1082, 432 N.E.2d 370, 372 (cocaine)).
In this case, the defendant admitted her awareness of what was going on, although she denied knowing of the presence of LSD in the freezer at the particular time the search warrant was executed. A substantial amount of the cannabis found when the warrant was executed was packaged in small plastic bags, placed together in a larger plastic bag, in a master bedroom closet which contained both men’s and women’s clothing. Although defendant testified she had argued with her husband about the drugs and had stated her disapproval to him, according to her own testimony she, as well as the family unit, benefited from the drug sales to the extent that the proceeds paid the rent. In addition, her husband, apparently otherwise unemployed, took care of the couple’s four-year-old son while she worked. Otherwise, the couple presumably would have had to make arrangements for child care, possibly at some expense. Upon our review of the evidence, we conclude that there was sufficient evidence from which the jury could draw the requisite inferences to sustain the defendant’s conviction of the offenses beyond a reasonable doubt.
Defendant next argues that the prosecutor’s comments in closing argument deprived her of a fair trial. Generally, the prosecutor’s remarks in closing argument do not amount to reversible error unless they deprive the defendant of a fair trial in that they (1) constitute a material factor in the defendant’s conviction (see People v. Clark (1972), 52 Ill. 2d 374, 288 N.E.2d 363), or (2) result in substantial prejudice to him (see People v. Richard (1980), 88 Ill. App. 3d 247, 410 N.E.2d 459). It has been held that the prejudicial effect of the improper remarks is lessened where the trial court properly instructs the jury. (See People v. Lloyd (1981), 93 Ill. App. 3d 1018, 418 N.E.2d 131; People v. Wade (1979), 71 Ill. App. 3d 1013, 389 N.E.2d 1230.) The test to determine the significance of the error is whether the jury would have reached a contrary verdict had the improper remarks not been made. People v. Witted (1979), 79 Ill. App. 3d 156, 398 N.E.2d 68.
With these standards in mind, we look to the specific remarks to which the defendant objects. In the first of these, the prosecutor stated: “Now in this case the defendant, as every other defendant is presumed to be not guilty until we say different.” It is fundamental that the law presumes the innocence of the accused until he is proved *603guilty beyond a reasonable doubt (People v. Weinstein (1966), 35 Ill. 2d 467, 220 N.E.2d 432), and it has been stated that arguments which diminish the presumption of innocence are forbidden (People v. Harbold (1984), 124 Ill. App. 3d 363, 371, 464 N.E.2d 734, 741). It is not proper to comment on reasonable doubt, or on the presumption of innocence, so as to de-emphasize the State’s burden (People v. Johnson (1981), 102 Ill. App. 3d 122, 429 N.E.2d 905). Upon our review of these authorities, Harbold refers to People v. Tate (1970), 45 Ill. 2d 540, 545-46, 259 N.E.2d 791, 794, cert. denied (1971), 401 U.S. 941, 28 L. Ed. 2d 222, 91 S. Ct. 944, as setting forth the standard to be applied on review, i.e., that a reviewing court should assess the arguments of counsel in the context of the whole trial, and should sustain a conviction unless it appears that improper comment substantially prejudiced the accused.
We do not believe that that standard is met in this case, although we agree with the defendant that the remark was improper and a misstatement of the law. In Harbold, among other trial errors in a close case based on circumstantial evidence, the prosecutor had repeatedly argued that no evidence showed the defendant to be not guilty, a line of argument which obviously diminished the presumption of innocence. In Weinstein, the prosecutor’s remarks were more to the effect that before the defendant could be found not guilty for the murder of her husband, the jury must say that she had “created reasonable doubt.” In that case the reviewing court counted some 17 objections which were made and sustained as the prosecutors argued to the jury, and the court concluded that prejudicial error had occurred as the defendant had been convicted on a theory of accountability for inciting, aiding, and abetting an illicit lover in the murder of her husband. The Weinstein court reasoned that the line of argument had destroyed the presumption of innocence, imposed on defendant a heavier burden than the law required while lessening that of the prosecution, and was tantamount to telling the jury that defendant had the burden of proving her innocence. In Tate, the prosecutor’s closing argument included a statement that “ ‘the principle of recent unexplained possession [on a charge of theft auto] makes it incumbent upon the defense to come forward and explain why and how that possession came about’ ” and “ ‘[t]he rule is that they have to offer an explanation or this rule of law inures against him.’ ” (People v. Tate (1970), 45 Ill. 2d 540, 545, 259 N.E.2d 791, 793.) The reviewing court concluded that, when read in the context of the entire trial, any error occasioned by these statements was harmless, given that the jury was correctly instructed and the evidence against the defendant was so *604overwhelming that the reviewing court had no doubt that the prosecutor’s untoward comment had no effect on the verdict.
Here, immediately following the remark complained of, the prosecutor informed the jury that the defendant was not required to prove anything and that the State had the burden of proving beyond a reasonable doubt that the defendant had committed the offenses, as the judge would instruct. The jury was instructed on the presumption of innocence and the State’s burden of proving the guilt of the defendant beyond a reasonable doubt (Illinois Pattern Jury Instruction (IPI), Criminal, No. 2.03 (2d ed. 1981)), that closing arguments are not evidence (IPI Criminal 2d No. 1.03), and on the elements of the offenses. We therefore conclude that the isolated remark did not deprive her of a fair trial.
Defendant next argues she was denied a fair trial when the prosecutor, in rebuttal argument, commented on matters not in evidence:
“Now we didn’t test the roach butts for lipstick. We didn’t look at these crinkled pieces of paper and find out if they had lipstick on them. Now when [defense counsel] asked that question, I took a look at the defendant yesterday. I didn’t see any lipstick. You had an opportunity to observe her. Do you recall? Today she has it on. Yesterday she didn’t.”
Defense counsel objected and requested that the court instruct the jury to disregard the prosecutor’s comment. The court instructed the prosecutor to restrict his comments to rebuttal, and said the jury could consider the evidence and was aware of the evidence.
Assumptions and statements of fact not based upon evidence presented in the case may not properly be argued to the jury (People v. Beier (1963), 29 Ill. 2d 511, 516-17, 194 N.E.2d 280, 283); and the prosecutor may not properly intellect before the jury that which amounts to his own testimony. (See People v. Rothe (1934), 358 Ill. 52, 56-57, 192 N.E.2d 777, 779; People v. Black (1925), 317 Ill. 603, 619, 148 N.E.2d 281, 287.) The State maintains that the defendant invited these remarks by referring to the fact that the State had not tested the remains of marijuana cigarettes found in the residence for the presence of lipstick. It is well known that the defendant ordinarily cannot claim error where the prosecutor’s remarks were in reply to, and invited by, defense counsel’s argument. (People v. Dixon (1982), 91 Ill. 2d 346, 350-51, 438 N.E.2d 180, 183; People v. Vriner (1978), 74 Ill. 2d 329, 344, 385 N.E.2d 671, 677.) This “invited error” concept does not, however, go so far as to insulate any related remarks the prosecutor may choose to make. We conclude that the prosecutor *605went beyond responding to the matter raised by defense counsel when he interjected his recollection of the absence of lipstick on the defendant in the courtroom on a prior date, in contrast to the presence of lipstick on the defendant in .the courtroom on the date of the comment. Although the State argues on appeal that the prosecutor’s remark was designed to show the jury that the presence or absence of lipstick on the butts of the marijuana cigarettes would have been of little probative value, that was not the gist of the prosecutor’s statement.
We find that these comments by the prosecutor were improper. Nevertheless, applying the standards as set forth in Tate, and referred to in Harbold, and as in Witted, we conclude that the comment did not deny the defendant a fair trial. In this connection, we find distinguishable the case of People v. Escobar (1979), 77 Ill. App. 3d 169, 395 N.E.2d 1028, cited by the defendant. We acknowledge that the Escobar court found that the prosecutor’s statement, interjecting what was technically unsworn testimony in rebuttal argument, was reversible error, despite the fact that the State could have introduced the evidence properly. In Escobar, the State’s case was deemed by the reviewing court to be marginal, because only one out of five occurrence witnesses identified the defendant and he was impeached on several matters. Therefore, the Escobar court found that any impropriety may have swayed the verdict, and no error could easily be dismissed as harmless. As the conviction was tainted by several errors, and regarded as at least cumulatively substantial, the court reversed and remanded for a new trial. The evidence which was interjected in Escobar was that the defendant’s hand bore a small tattoo “New York NY.” The State’s single occurrence witness had testified he recognized the driver of a car which carried a gunman who fired and killed an individual as an old high school acquaintance whom he knew only as “New York.” Thus, in a close case, the dramatic tactic of the prosecutor may have seemed to bolster the identification and testimony of the single occurrence witness. We do not believe that the impropriety here affected the verdict. The defendant was not charged with using the drug, and we do not deem her use or nonuse to be critical to the jury’s deliberations.
The defendant’s third argument is that the court erred in sentencing her to a term of probation of 48 months for possession of cannabis with intent to deliver (Ill. Rev. Stat. 1983, ch. 56½, par. 705(d)), involving more than 30 grams but not more than 500 grams of a substance containing cannabis, a Class 3 felony, for which the statutory maximum period of probation is 30 months. (Ill. Rev. Stat. 1983, ch. *60638, par. 1005—6—2(b)(2).) We note that the defendant was originally charged with possession of more than 500 grams of cannabis, a Class 2 felony, for which the statutory, maximum term of probation is four years. (Ill. Rev. Stat. 1983, ch. 56½, par. 705(e); Ill. Rev. Stat. 1983, ch. 38, par. 1005—6—2(b)(1).) The State concedes that the court erred in sentencing the defendant to a period of probation in excess of the statutory maximum, and suggests that this court exercise its authority (87 Ill. 2d R. 615(b)(4)) and reduce the term of probation to the 30-month maximum permitted by the statute. Defendant requests that her sentence be vacated and the cause remanded for resentencing, and for reasons discussed below, we elect to vacate the sentence as in excess of the statutory maximum and remand for resentencing.
Defendant next argues that the court erred in sentencing her to a term of imprisonment as a condition of her probation. As a general proposition, the trial court is statutorily authorized to require as a condition of the probationary term that the offender be committed to a period of imprisonment, so long as it is not in excess of six months and the offender is not committed to the Department of Corrections. (Ill. Rev. Stat. 1983, ch. 38, par. 1005—6—3(d); see generally Annot., Propriety of Conditioning Probation on Defendant’s Serving Part of Probationary Period in Jail or Prison, 6 A.L.R.4th 446 (1981).) The trial court is afforded broad discretion in imposing conditions of probation (People v. Williams (1981), 96 Ill. App. 3d 588, 421 N.E.2d 1039), and a court of review may not substitute its judgment for that of the trial court merely because it would have balanced the factors differently or might have imposed a different sentence, but only if there was a clear abuse of discretion. (People v. Perruquet (1977), 68 Ill. 2d 149, 368 N.E.2d 882; People v. Cox (1980), 82 Ill. 2d 268, 412 N.E.2d 541.) This standard arises from the fundamental distinction between the functions of each court. A reasoned judgment as to proper sentence must be based upon the particulars of each individual case, and depends on many factors, including the defendant’s credibility, demeanor, general moral character, mentality, habits, age, and social environment. The trial judge, in the course of the trial and the sentencing hearing, has an opportunity to observe, so as to permit meaningful consideration of these factors, which is not afforded “ ‘by the cold record in this court.’ ” People v. Perruquet (1977), 68 Ill. 2d 149, 154, 368 N.E.2d 882, 884.
Defendant specifically argues that the court erred in that it referred to the fact that she “had to know that the sale of cannabis would cause serious harm to other people,” and improperly regarded this as an aggravating circumstance. In support of her argument that *607the court relied upon an “unfounded threat of harm” as an aggravating factor, defendant relies on People v. Robinson (1981), 92 Ill. App. 3d 972, 416 N.E.2d 793, and People v. Allen (1981), 97 Ill. App. 3d 38, 422 N.E.2d 254. In Robinson, the reviewing court found no error in the trial court’s viewing the harm caused to the victim as an aggravating factor in sentencing for the offense of armed violence, since the sentencing range for armed violence adopted by the legislature applied irrespective of the underlying felony, which may or may not be committed without inflicting serious bodily harm. In Allen, this court observed that the supreme court in People v. Brownell (1980), 79 Ill. 2d 508, 404 N.E.2d 181, and People v. Conover (1981), 84 Ill. 2d 400, 419 N.E.2d 906, narrowly construed the use of aggravating factors, and stated that this court would likewise narrowly construe the use of the aggravating factor of risk of harm. In Allen, the conduct considered to be aggravating was the defendant’s sticking his body out of a window and withdrawing it back into the building — the primary threat of serious harm extending primarily to the burglar, and being no greater than that inherently undertaken by almost all of those who attempt burglaries. The Allen court noted that the threat of serious harm to police was present in the case, as in almost all burglaries, and assumed that the legislature considered this type of threat when it established the minimum penalty for burglary. This court stated that for the aggravating factor serious harm under section 5—5—3.2(a)(1) of the Unified Code of Corrections (Code ) (see Ill. Rev. Stat. 1983, ch. 38, par. 1005—5—3.2(a)(1)) to be applied properly, the risk of harm must be greater than that inherent in almost all burglaries. As the threat in that case did not meet that standard, this court remanded the cause for resentencing as it was unable to determine how much weight the factor was afforded. Defendant urges that the same result should adhere in this case as in Allen, as the risk of harm engendered by her conduct was no greater than that inherent in all possessions of cannabis with intent to deliver.
We disagree. Section 5—5—3.1 of the Code specifies factors to be accorded weight in favor of withholding or minimizing a sentence of imprisonment, as was argued for here by the State; while section 5—5—3.2 enumerates factors to be accorded weight in favor of imposing a term of imprisonment. (Ill. Rev. Stat. 1983, ch. 38, pars. 1005—5—3.1, 1005—5—3.2.) It is evident that the judge directed the remark complained of to the intent to deliver cannabis conviction; to the extent that there may have been any error in the reference to this factor, we conclude that it was harmless in this case. The court rejected a sentence of imprisonment as the appropriate disposition, and chose *608instead to place the defendant on probation. The reviewing courts which considered the proper use and application of statutory aggravating factors in the decisions referred to did so in other contexts— the defendants in Conover and Allen had been sentenced to terms of imprisonment, and the defendant in Brownell had been sentenced to death.
It has been held that a sentencing court’s reliance on an improper factor in aggravation does not automatically require remandment, if the record shows that the weight given the factor was insignificant and did not lead to greater sentence. (People v. Bourke (1983), 96 Ill. 2d 327, 332, 449 N.E.2d 1338, 1340.) We conclude that this rationale is appropriate to the circumstances herein; therefore, we need not further consider the reasoning stated in Allen.
Section 5 — 6—1(a) of the Code provides:
“Except where specifically prohibited by other provisions of this Code, the court shall impose a sentence' of probation or conditional discharge upon an offender unless, having regard to the nature and circumstance of the offense, and to the history, character and condition of the offender, the court is of the opinion that:
(1) his imprisonment or periodic imprisonment is necessary for the protection of the public; or
(2) probation or conditional discharge would deprecate the seriousness of the offender’s conduct and would be inconsistent with the ends of justice.” (Ill. Rev. Stat. 1983, ch. 38, par. 1005—6—1(a).)
The appropriate conditions to be attached to a defendant’s term of probation are a matter for the trial court’s discretion, and the conditions imposed will not be reversed solely for the reason that the court failed to provide an explanation for each, so long as the record does not show a clear abuse of discretion. The time for a defendant to seek such explanation is the sentencing hearing, when the trial court can respond. Just as the trial court’s failure to state reasons for the sentence is waived unless the defendant asks for a fuller statement at the sentencing hearing (People v. Tyus (1981), 97 Ill. App. 3d 207, 210, 422 N.E.2d 1148, 1150; People v. Davis (1982), 93 Ill. 2d 155, 162-63, 442 N.E.2d 855, 858), so also may the opportunity for an explanation of the conditions for probation be waived if a defendant fails to avail himself of it at that time. See also People v. Meeks (1980), 81 Ill. 2d 524, 534, 411 N.E.2d 9, 14 (requirement that judge set forth reasons for particular sentence imposed does not obligate the judge to recite, and assign a value to, each fact presented in evidence at the sentenc*609ing hearing).
The defendant also argues that equity and other mitigating factors outweigh the need to deter, referred to by the court, and that any imprisonment was improper. Defendant’s argument, that the reference to the need to deter others was improper because she merely possessed knowledge of the activities of her husband and did nothing more than disapprove of his drug dealings, ignores the fact that the jury convicted her of the offenses. In view of the standard of review, we find no abuse of discretion in the implementation of a term of imprisonment as a condition of the probationary terms.
Inasmuch as we are remanding for resentencing on the conviction of intent to deliver (cannabis), we observe that the six months of imprisonment imposed as a condition of each of the defendant’s terms of probation was split, with the last five months of the imprisonment to be served at the end of each probation period, the court stating that there was a possibility of remission as to that portion of the imprisonment condition. The Illinois Supreme Court has expressed doubt as to the wisdom of delaying a sentence of continuous imprisonment but recognized that there are occasionally reasons why delaying a confinement period might better suit the particular circumstances of a given case, and that the trial judge has a broad discretion in this area. (See People v. Tipton (1981), 88 Ill. 2d 256, 265, 430 N.E.2d 1023, 102728.) We believe that it would be better practice when such an order is entered with the possibility of remission to specify a date of hearing at which the court would consider remitting all or part of the imprisonment imposed as a condition of probation, as had been done with defendant Richardson in Tipton. Therefore, on remand, we direct that the trial court should set such dates for hearings on each of the defendant’s probation terms.
Finally, defendant contends that the trial court erred in ordering her to pay costs of court-appointed counsel in the amount of $2,230.24, because the court failed to conduct a hearing before ordering recoupment as required under section 113—3.1(a) of the Code of Criminal Procedure of 1963, and in the absence of evidence demonstrating her “foreseeable ability to pay.” The State concedes that the trial court erred in this regard, and that this court should vacate that portion of the order assessing the fee for the appointed attorney as costs. We concur and vacate that portion of the order on costs; and remand so the trial court may conduct a hearing on defendant’s ability to make payment.
To recapitulate, defendant’s convictions are affirmed. The sentence imposed on the conviction for possession with intent to deliver *610(cannabis) is reversed and remanded for resentencing. The sentence on the conviction for possession (controlled substance) is affirmed and remanded for further proceedings not inconsistent with this opinion. The judgment for costs of appointed counsel is reversed, vacated, and remanded.
Affirmed in part, reversed in part, vacated in part, and remanded with directions.
TRAPP and MORTHLAND, JJ., concur.