
5 Ill. App.3d 624 (1972)
283 N.E.2d 696
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
OBERT RAY, Defendant-Appellant.
No. 70-126.
Illinois Appellate Court  Fifth District.
May 12, 1972.
Kenneth L. Jones, of Defender Project, of Mt. Vernon, for appellant.
Robert H. Rice, State's Attorney, of Belleville, for the People.
Judgment reversed.
Mr. JUSTICE JONES delivered the opinion of the court:
Defendant pleaded guilty to two indictments charging him with separate incidents of disposing of collateral and failing to pay the secured party the amounts due under security agreements in violation of Ill. Rev. Stat., ch. 26, sec. 9-306.01. His guilty pleas were accepted in the Circuit Court of St. Clair County and on July 14, 1970, he was sentenced to the penitentiary for a term of not less than one nor more *625 than ten years. In this appeal defendant challenges the sufficiency of the indictments and the severity of his sentence.
Subsection (1) of the statute in question provides that,
"It is unlawful for a debtor under the terms of a security agreement (a) who has no right of sale or other disposition of the collateral or (b) who has a right of sale or other disposition of the collateral and is to account to the secured party for the proceeds of any sale or other disposition of the collateral, to sell or otherwise dispose of the collateral and willfully and wrongfully to fail to pay the secured party the amount of said proceeds due under the security agreement."
The two indictments were identical with the exception of the dates, ownership of the automobiles held as collateral, and the amounts of the liens. In substance each charged the defendant with selling a particular car "knowing" it to have been pledged as security to the First National Bank of Belleville "and failing to pay said bank the amount of the proceeds due" under said security agreement.
Defendant contends that the indictments failed to charge a crime in that they failed to allege either that defendant had no right to sell the pledged property, or that the defendant "willfully and wrongfully" failed to pay the secured party the amount of the proceeds due. The State makes no reply to these contentions, but suggests only that the case be disposed of by reducing defendant's sentence to the time which he has already served.
 1, 2 The State's proposal fails to meet the issue. It is an accepted rule that a trial court is not authorized to convict a person who has not been charged with an offense and an indictment thus defective may be attacked at any time even though the point was not raised in the trial court and even though the conviction was based on a plea of guilty. People v. Reed, 33 Ill.2d 535, 213 N.E.2d 278; People v. Billingsley, 67 Ill. App.2d 292, 213 N.E.2d 765.
 3, 4 No purpose would be served here by entering into a discussion of the elements comprising a proper charge in an indictment or information subsequent to the enactment of chapter 38, section 111 (3), Ill. Rev. Stat. That subject matter has already received exhaustive consideration in the cases and there is nothing peculiar in this case that complicates the application of the rules. (See People v. Billingsley, supra; and People v. Ball, 126 Ill. App.2d 9, 261 N.E.2d 417.) It is sufficient for our purpose to state it to be elementary that an indictment or information must allege that the defendant committed a crime and the necessary elements of the crime must be contained in the charge, especially where they are an integral part of the offense. For instance, an indictment that does not contain an allegation concerning intent when an intent is an *626 element of the offense is fatally defective. (People v. Matthews, 122 Ill. App.2d 264, 258 N.E.2d 378; and People v. Dixon, 276 N.E.2d 42.) The statute here provides that "It is unlawful for a debtor * * * to sell or otherwise dispose of the collateral and willfully and wrongful to fail to pay the secured party * * *." It is thus seen that it is an integral part of the offense that the failure to pay must be willful and wrongful. In People v. Swets, 24 Ill.2d 418, 182 N.E.2d 150, the Supreme Court, in reviewing a conviction under section 18.01 of the Uniform Trust Receipts Act (Ill. Rev. Stat., 1957, ch. 121 1/2, par. 183.1), which was the predecessor of the statute here under consideration, said, "The offense in question is not a matter of simple nonpayment, as defendant apparently assumes, but of willful and wrongful nonpayment."
 5 Applying these rules to the subject case we must conclude that the indictments were insufficient to charge an offense since they do not charge, in the language of the statute, that defendant "willfully and wrongfully" failed to pay the proceeds to the secured party. In effect, the facts alleged may all be true and yet they may constitute no offense. Left open is the possibility that the defendant may have had reasonable cause for not having turned over the proceeds; his failure to do so may not have been willful or wrongful, and willfullness is an essential element of the crime. The rule that such an indictment is fatally defective and void is particularly applicable where a plea of guilty is entered, for an accused may fully admit doing that with which he is charged and yet be totally ignorant of the fact that his conduct did not constitute a public offense.
For the reasons stated the judgment of the Circuit Court of St. Clair County is reversed and we, therefore, have no reason to consider defendant's argument relative to sentence.
Judgment reversed.
EBERSPACHER, P.J., and CREBS, J., concur.
