
138 N.W.2d 798 (1965)
J. K. GALLOWAY, James R. GAUSTAD, Paul V. Reslock, Arne Springan, and O. Clifford Wold, as Members of the North Dakota State Board of Optometry, Plaintiffs and Appellants,
v.
FORUM PUBLISHING COMPANY, a Corporation, Defendant and Respondent.
No. 8262.
Supreme Court of North Dakota.
November 30, 1965.
Rehearing Denied December 30, 1965.
*800 Hjellum, Weiss, Nerison & Jukkala, Jamestown, for plaintiffs and appellants.
Wattam, Vogel, Vogel, Bright & Peterson, Fargo, for defendant and respondent.
STRUTZ, Justice.
The plaintiffs and appellants, as members of the North Dakota State Board of Optometry, bring this action to restrain the defendant from accepting for publication and from publishing certain commercial advertising for the sale of eyeglasses, frames, and optical appliances, which advertising was submitted to it by certain optical companies located in the State of Minnesota. The plaintiffs contend that the acceptance and the publishing of such advertising by the respondent is in violation of Section 43-13-29, North Dakota Century Code.
After the service of summons and complaint, the defendant moved for an order *801 dismissing the plaintiffs' complaint on the ground that it failed to state a cause of action upon which relief could be granted. The court, after hearing, issued its order granting the defendant's motion.
Thereafter, the plaintiffs served notice of motion and motion for leave to amend their complaint, together with a copy of the proposed amended complaint. Such motion was argued before the court, and the court, after due consideration, denied the same. This appeal is from the order denying plaintiffs' motion for leave to so amend the complaint. The only issue for this court to determine on this appeal is whether the trial court erred in denying plaintiffs' motion to amend.
The statute which plaintiffs claim defendant is violating is Section 43-13-29, North Dakota Century Code. This statute prohibits persons, firms, partnerships, companies, or corporations from soliciting the sale of eyeglasses, spectacles, lenses, frames, mountings, or any other optical appliances or devices, eye examinations or visual services, by newspaper, radio, window display, television, or any other means of advertisement, or to use any other method of persuading or enticing the public into buying eyeglasses, spectacles, lenses, frames, or such other optical appliances or devises for visual correction. The section also provides that its terms shall not render any advertising media liable for publishing any advertising furnished them by a vendor of such commodities.
Our rules of civil procedure provide that a party may amend his pleading once, as a matter of course, at any time before responsive pleading is served or, if the action has not been placed on the trial calendar, such pleading may be amended at any time within twenty days after it is served. Thereafter, such party may amend his pleading only by leave of the court or by written consent of the adverse party. The rule then goes on to provide:
"* * * leave shall be freely given when justice so requires. * * *" Rule 15(a), N.D.R.Civ.P.
The plaintiffs contend that denying plaintiffs' motion for leave to amend their complaint was error as a matter of law.
Rule 15(a), North Dakota Rules of Civil Procedure, requires liberality in allowing amendments, and leave to amend should be granted when justice so requires and when the adverse party will not be prejudiced thereby. Foman v. Davis, 371 U.S. 178, 182, 83 S.Ct. 227, at 230, 9 L.Ed.2d 222.
This rule does not, howeveras appellants seem to believeabsolutely guarantee that such amendment of pleadings will be permitted in all cases. The amendment of such pleadings, while it is to be freely permitted "when justice so requires," nevertheless submits to the informed, careful judgment and discretion of the trial court the question of whether such amendment shall be permitted. And, in the absence of a showing of an abuse of such discretion, this court will not reverse an order of the trial court denying the plaintiffs' motion to amend. The denial of the plaintiffs' motion for leave to amend their complaint is not erroneous as a matter of law. The main consideration of the court, in determining whether to grant or deny the motion for leave to amend, is whether the granting of such motion or the denial thereof will work an injustice to any of the parties.
When the trial court granted the defendant's motion to dismiss plaintiffs' complaint on the ground that it failed to state a claim upon which relief could be granted, the plaintiffs had an absolute right to amend their complaint, as a matter of course, under Rule 15(a). Twenty days had not elapsed since the service of summons and complaint and a responsive pleading had not been served by the defendant. A motion to dismiss is not a responsive pleading within the provisions of this rule. *802 Keene Lumber Co. v. Leventhal, 1 Cir., 165 F.2d 815 (1948); Segui v. O'Rourke, 9 Cir., 328 F.2d 965 (1964); Fuhrer v. Fuhrer, 7 Cir., 292 F.2d 140 (1961); Breir v. Northern California Bowling Proprietors' Ass'n, 9 Cir., 316 F.2d 787 (1963).
But the plaintiffs did not amend their complaint as a matter of course. Instead, they moved for leave to amend. By making such motion for leave to amend, they waived their right to amend as a matter of course, and the matter was submitted to the court for consideration as if leave of the court were required. Vars v. International Brotherhood of Boilermakers, etc., D.C., 204 F.Supp. 245 (1962).
In passing on the plaintiffs' motion for leave to amend, the trial court considered the proposed amendment of the complaint and determined that such proposed amendment did not state a claim upon which relief could be granted. The plaintiffs now contend that such determination, that the proposed amendment did not state a claim upon which relief could be granted, was error as a matter of law. Just how the trial court was to determine whether, under Rule 15(a) of the North Dakota Rules of Civil Procedure, justice requires that a motion for leave to amend should be granted, without considering the proposed amendment, is not explained by the plaintiffs. Surely the trial court, in order to determine whether justice required the granting of the plaintiffs' motion to amend, must first determine whether the plaintiffs' proposed amendment did state a claim upon which relief could be granted. If the plaintiffs' proposed amended complaint failed to state a claim, then justice could not require that the motion be granted.
The law which the plaintiffs contend is being violated by defendant prohibits the soliciting of sales of spectacles and other optical appliances and devices by means of advertising or other means of persuading or enticing the public into buying the same. It specifically provides that advertising media, such as the defendant, should not be liable for publishing any advertising furnished to them by a seller of such articles. The mere fact that those who are violating the statute which prohibits soliciting the sale of optical devices are nonresidents of the State, would not make the defendant liable for publishing such advertising, or subject to being enjoined from publishing such advertising, where the statute specifically provides that advertising media shall not be liable for publishing any advertising furnished by such seller.
Counsel for appellants has cited the case of Head, d/b/a Lea County Publishing Co., v. New Mexico Board of Examiners in Optometry, 374 U.S. 424, 83 S.Ct. 1759, 10 L.Ed.2d 983, in which the United States Supreme Court affirmed a decision of the Supreme Court of New Mexico enjoining a newspaper and a radio station from accepting or publishing a Texas optometrist's advertising, which violated a New Mexico statute prohibiting such advertising, by quoting prices or terms for sale of eyeglasses.
We have carefully read the United States Supreme Court's decision, and we do not believe it to be in point. The New Mexico statute, Section 67-7-13(m), New Mexico Statutes of 1953, is similar to the North Dakota statute in that it prohibits certain advertising of prices or terms for sale of eyeglasses, spectacles, lenses, frames, or mountings, or which quotes discounts to be offered on eyeglasses, etc. But the New Mexico statute, unlike our statute, does not have any provision exempting advertising media from liability for publishing any advertising furnished them by a vendor of such commodities. As we have heretofore pointed out in this opinion, our statute specifically provides:
"* * * the provisions of this section shall not render any advertising media liable for publishing any advertising furnished them by a vendor of said commodity or material; * * *" Sec. 43-13-29, N.D.C.C.
*803 We believe this provision in the North Dakota law distinguishes it from the New Mexico statute, and that therefore the decision in the New Mexico case relied on would not be applicable to our case.
We have carefully examined the plaintiffs' complaint and the plaintiffs' proposed amendment to the complaint, and we are of the opinion that neither the complaint nor the proposed amendment states a claim against the defendant. The amended complaint alleges that the defendant is guilty of maintaining a nuisance. A nuisance, under our statute, consists in unlawfully doing an act or omitting to perform a duty. Sec. 42-01-01, N.D.C.C. Since the statute, Section 43-13-29, specifically provides that advertising media are not liable for doing what was done in this case, the defendant cannot be guilty of maintaining a nuisance by its acts.
Because such proposed amendment still fails to state a claim against the defendant upon which relief could be granted, the trial court did not err in denying the plaintiffs' motion to amend.
The order appealed from is affirmed.
BURKE, C. J., and TEIGEN, ERICKSTAD and KNUDSON, JJ., concur.

On Petition for Rehearing.
The appellants have filed a petition for rehearing in which they suggest that the court has overlooked the fact that their proposed amended complaint alleges that the objectionable advertising by the respondent constitutes a public nuisance.
This matter was considered by the court. We believe that the remedy of appellants should be sought through the Legislature. Where that body, in its wisdom, specifically provided that certain publications by advertising media should not render such media liable for publishing the same, we fail to comprehend on what theory the courts should hold such acts by such media a public nuisance.
The petition for rehearing is denied.
STRUTZ, ERICKSTAD, KNUDSON and TEIGEN, JJ., concur.
BURKE, C. J., did not participate.
