Jaime Raul Lopez III appeals his conviction of aggravated batteiy, challenging the sufficiency of the evidence and the district court’s assessment of costs, expenses, and attorney fees. We affirm his conviction but reverse and remand for further proceedings on the award of costs and attorney fees.
Factual and Procedural Background
For his role in a general melee involving 12 to 15 individuals at an apartment complex near Fort Hays State University in the early morning hours of November 13, 2003, Lopez was charged with the second-degree murder of Clint Johnson and the aggravated battery of Jason Penka. He was also charged with intimidating two witnesses to tírese events, Steven Vincent and Christopher Ross.
The detailed facts regarding the melee are extremely convoluted, but the dispute began with racial slurs directed toward Lopez and others, and then escalated to a general community fight involving attacks and retreats over several hours and at various locations within the apartment complex, with various weapons used by various individuals and varying groups of individuals, many of whom were never conclusively identified.
According to the State, Lopez attacked Johnson after he was already down as a result of violent attacks by others, and Lopez attacked Penka with a knife during a chase, rendering a puncture wound to Penka’s back. After the incidents of November 13,2003, the State claimed Lopez asked two witnesses to relate stories to the authorities that were not truthful.
Numerous persons were charged with various aspects of the melee, but all pled except Lopez. His trial lasted 7 days, included the testimony of 33 witnesses, and consumed over 1,300 pages of transcript. The jury acquitted Lopez of the murder charge, but convicted him of the aggravated batteiy and both counts of intimidating a witness. Lopez appeals.
*725 Was There Sufficient Evidence to Support the Aggravated Battery Conviction?
Lopez first argues that there was insufficient evidence to support his conviction of aggravated battery; he emphasizes that no one testified that they saw him stab Penka and that Penka was completely unaware of any such attack until the next morning when the wound was discovered.
When the sufficiency of the evidence is challenged in a criminal case, the standard of review is whether, after review of all the evidence, viewed in the light most favorable to the prosecution, the appellate court is convinced that a rational factfinder could have found the defendant guilty beyond a reasonable doubt. State v. Calvin, 279 Kan. 193, 198, 105 P.3d 710 (2005).
We begin by endorsing well-established rules for analyzing the jury’s conviction. A reasonable inference of guilt may be established by circumstantial evidence; Kansas case law is clear that a conviction for even the gravest offense may be sustained on circumstantial evidence. State v. Dixon, 279 Kan. 563, 621, 112 P.3d 883 (2005). Circumstantial evidence tends to prove a fact in issue by proving other events or circumstances which afford a basis for a reasonable inference by the juiy of the occurrence of the fact in issue. State v. Evans, 275 Kan. 95, 105, 62 P.3d 220 (2003); see State v. Boone, 277 Kan. 208, 217, 83 P.3d 195 (2004).
We have sifted through the trial testimony and conclude that, when viewed in the light most favorable to the prosecution, the evidence supporting the conviction can be summarized as follows: (1) the initial racial slurs directed toward Lopez were made by Penka, thus providing some evidence of motive; (2) Lopez is the only individual with a knife seen by any witness to the entirety of the events that evening; (3) two witnesses identified Lopez as having a steak knife; (4) one of these witnesses relates the story in a fashion that permits an inference that Lopez had the knife during the chase of Penka; (5) Lopez was seen in the lead of the group that chased Penka into his apartment; (6) a steak knife with the handle broken off was found the next day near Penka’s apartment, and lab tests matched Penka’s blood to the blood found on the *726knife; (7) the only other time Penka was attacked during die melee, diere were no knives seen by any witness; and (8) Penka received his small puncture wound in the back at some time during the melee, although he remained unaware that he had been stabbed until the next day.
From this evidence, the jury could form a reasonable inference that Lopez punctured Penka’s back — without Penka’s awareness of the wound — during the chase of Penka into his apartment. Even if all of the evidence might support another theory of events, our function is to determine whether a basis of evidence exists to support the jury’s determination of guilt. Boone, 277 Kan. at 218. Moreover, despite some evidence casting doubt on the credibility of lcey witnesses, we simply do not reweigh such evidence or redetermine the credibility of witnesses. State v. Mays, 277 Kan. 359, 363, 85 P.3d 1208 (2004).
We conclude that there was sufficient evidence to support Lopez’ conviction of aggravated battery of Penka.
Did the District Court Err in Awarding the State All Costs and $2,108 in Witness ExpensesP
Lopez next challenges the district court’s award of costs and expenses. The award consisted of two major components: (1) $1,108.12 “through the clerk of court” for court costs including preliminary hearing witness fees and mileage, jury trial witness fees, and docket fees; and (2) $2,108.32 for a portion of the travel expenses for trial witnesses, including flight tickets, lodging, or mileage for Thaddeus Brown, David Garcia, Lauren Hargitt, Jason Penka, Nikki Hopkins, Michael Penka, Eric Cerovsky, Steve Vincent, and Cody Zimmerman. Lopez argues on appeal that a significant portion of these costs and expenses are not related to his convictions, but rather were incurred in connection with a charge for which he was acquitted.
To the extent that this issue requires statutory interpretation, we exercise unlimited review. See State v. Goeller, 276 Kan. 578, 584, 77 P.3d 1272 (2003). To the extent that the district court has discretion in an award for costs and expenses, we review for an abuse *727of discretion. See State v. Phelps, 28 Kan. App. 2d 690, 697, 20 P.3d 731, rev. denied 271 Kan. 1041 (2001).
It is well settled in Kansas that upon conviction in a criminal action the defendant is hable for the costs of both the prosecution and defense of the case. K.S.A. 22-3801; State v. Shannon, 194 Kan. 258, 263, 398 P.2d 344, cert. denied 382 U.S. 881 (1965). Kansas courts have held that statutes requiring a convicted defendant to pay court costs were not intended to penalize the defendant, but to allocate the expenses incurred in prosecution. State v. Dean, 12 Kan. App. 2d 321, 323, 743 P.2d 98, rev. denied 242 Kan. 904 (1987). In die only case addressing costs where the conviction^) were fewer than all the charges, this court has held that the docket fee assessed must be based upon the crime of conviction, not the crime of which the defendant was charged. State v. Waufle, 9 Kan. App. 2d 68, 77-78, 673 P.2d 109 (1983).
K.S.A. 22-3801(a) governs the liability for court costs: “If the defendant in a criminal case is convicted, the court costs shall be taxed against the defendant.” K.S.A. 2005 Supp. 28-172a sets the amount of the docket fee and authorizes other expenses to be assessed as court costs. The pertinent provision states: “All other fees and expenses to be assessed as additional court costs shall be approved by the court, unless specifically fixed by statute. Additional fees shall include, but are not limited to, . . . witness fees . . . .” K.S.A. 2005 Supp. 28-172a(d). Witness travel expenses are not specifically authorized to be assessed, but their assessment is also not expressly prohibited.
Whether these statutes authorize the award of costs and expenses (other than docket fees) that are unrelated to the defendant’s ultimate conviction is a question of first impression in Kansas. Other courts, however, have generally concluded that expenses of the government’s witnesses who testified about charges that resulted in acquittal cannot be assessed against the defendant as court costs. See United States v. Miller, 223 F. 183, 184-85 (S.D. Ga. 1915) (defendant cannot be charged with costs of witness whose testimony related only to counts resulting in acquittal); United States v. Palmer, 809 F.2d 1504, 1508-09 (11th Cir. 1987) (defendant who is not convicted on all charges cannot be assessed *728with the prosecution costs of the charges which resulted in acquittal or discharge); United States v. Fowler, 794 F.2d 1446, 1450 (9th Cir. 1986), cert. denied 479 U.S. 1094 (1987) (26 U.S.C. § 7206 [2000] authorizes recovery of costs associated with successful prosecution, not those associated exclusively with the unsuccessful prosecution); United States v. DeBrouse, 652 F.2d 383, 391 (4th Cir. 1981) (28 U.S.C. § 1918 [2000] authorizes ordering defendant to pay prosecution costs when convicted, but does not contemplate assessing expenses on charges of which defendant was acquitted); United States v. Troiani, 595 F. Supp. 186, 187 (N.D. Ill. 1984) (defendant convicted on fewer than all counts cannot be taxed with costs of counts on which acquitted or discharged); Commonwealth v. Smith, 239 Pa. Super. 440, 444-45, 361 A.2d 881 (1976) (defendant cannot be assessed costs attributable to charge resulting in acquittal); State v. Faulkner, 75 Wyo. 104, 119-20, 292 P.2d 1045 (1956) (finding statutory authority to tax defendant only for prosecution costs on offenses resulting in conviction, not acquittal).
Consistent with these authorities, we hold that it is beyond the district court’s discretion to award costs and expenses that were unrelated to prosecuting the crimes of conviction. Although it may be difficult to ascertain with precision, we believe the district court should determine which costs and expenses were necessary to prove the crimes of conviction, and we remand for this purpose. This approach has been approved by other state and federal courts. See, e.g., Palmer, 809 F.2d at 1509; Smith, 239 Pa. Super, at 445. In the event that the district court is unable to make this determination, some attempt must be made to fairly apportion costs, such as pro rata among all charges. See Faulkner, 75 Wyo. at 119-20.
In any event, we contemplate that the district court on remand will make requisite findings and conclusions in order to provide meaningful appellate review of this issue, if necessary.
Did the District Court Err in Ordering Lopez to Reimburse BIDS for his Attorney Fees?
Finally, Lopez challenges the district court’s order that he reimburse BIDS for the entirety of his attorney fees. Noting that the *729court failed to consider Lopez’ ability to pay at the time of assessment, the State concedes that this issue is now controlled by recent Supreme Court authority.
In State v. Robinson, 281 Kan. 538, Syl. ¶ 1, 132 P.3d 934 (2006), the Kansas Supreme Court held: “A sentencing court assessing fees to reimburse the Board of Indigents’ Defense Services under K.S.A. 2005 Supp. 22-4513 must consider on the record at the time of assessment the financial resources of the defendant and the nature of the burden that payment of the fees will impose.” Following Robinson, the district court’s order must be reversed and the matter remanded with directions for the district court to comply with K.S.A. 2005 Supp. 22-4513 as construed by Robinson regarding the assessment of attorney fees.
In summary, we affirm Lopez’ convictions, but we reverse the district court’s award of costs, expenses, and attorney fees and remand for further proceedings not inconsistent with this opinion.
Affirmed in part, reversed in part, and remanded with directions.