Modified calculate_bills method.