The only questioh presented for our consideration is, did the court have the power to allow the amendment? We think it unquestionably had such power.
The Code, § 908, under the provisions of which the solicitor made his motion to amend, is as follows:
“ No process or other proceeding begun before a justice of the peace, whether in a civil or criminal action, shall be quashed or set aside, for the want of form, if the essential matters are set forth therein ; and the court in which any such action shall be pending, shalt have power to amend any warrant, process, pleading, or proceeding in- such action, either in form or substance, for the furtherance of justice, on such terms as shall be deemed just, at any time either before or after judgment.
' Before the adoption of The Code there was no statute investing the courts with the power of amending process, pro*535ceedings, &c., had before justices of the peace. The only-legislation on that subject was that “no process issued by a justice of the peace shall be set aside for the want of form if the essential matters are set forth therein.” Rev. Code, ch. 62, § 22. This embraced civil as well as criminal process, but gave no power to amend in matters of substance. In civil actions, however, the amplest powers of amendment were given to the courts to amend any process, pleading or proceeding in such actions either'in form or substance for the furtherance of justice, on such terms as shall be just, at any time before judgment rendered therein. Rev. Code, ch. 3, §1.'
The Code in section 908 greatly extends the power of the courts. In fact, it gives them unrestricted power of amendment to all warrants, process, proceedings and pleadings in any action civil or criminal commenced before a justice of the peace in form or substance either before or after judgment.
We understand the purpose of the legislature in creating this statute was to confer power on the courts to make such amendment as may be deemed necessary to perfect the actions, pleadings, &c., begun before justices of the peace,
• where the essential matters are set forth, but not to change the character of the action or the nature of the offence intended to be charged.
And, while ample power of amendment is given in such cases, there is no restriction upon the discretion of the courts. His Honor in the court below might have refused, as a matter of discretion, to .allow the amendment, but where his refusal was put upon the ground of his not having power to allow it, there was error.
Whether in this case there was any necessity for the amendment, or whether the court should have allowed the particular amendment proposed, we express no opinion; but we are clearly of opinion that under the provisions of *536the statute the court had the power to make the amendment in question.
There is error. Let this be certified to the superior court of Greene county, that the case may be proceeded with according to law.
Error. Reversed.