The opinion of the court was delivered by
PAUL G. LEVY, J.A.D.The primary question in this appeal is whether it can be held as a matter of law that plaintiff, National Realty Counselors, Inc. (NRC), engaged in the unauthorized practice of law when it solicited defendant to negotiate, on defendant’s behalf, with a local tax assessor to try to have the tax assessment reduced for a building occupied by defendant. If NRC did engage in the unauthorized practice of law, the contract it made with defendant would be unenforceable as violative of public policy.1
On defendant’s motion, the complaint was dismissed for failure to state a claim upon which relief may be granted pursuant to R. 4:6-2(e). Colloquy during oral argument on the motion indicates that the judge was convinced that plaintiff engaged in the unauthorized practice of law, regardless of the express terms of the contract, which provided that plaintiff would retain an attorney to prepare and file a tax appeal. The action was dismissed, therefore, because the agreement between plaintiff and defendant was found to be illegal and unenforceable. Plaintiff appeals, contending the decision lacked factual or legal support in the record and the judge failed to apply the proper criteria for evaluation of the motion. We agree with plaintiff and reverse the order dismissing the complaint and remand.
*522A motion for dismissal for failure to state a cognizable claim pursuant to R. 4:6-2(e) should be based on the pleadings, with the court accepting as true the facts alleged in the complaint. Rieder v. State Dept. of Transportation, 221 N.J.Super. 547, 552, 535 A.2d 512 (App.Div.1987). However, where, as here, “matters outside the pleadings are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided by R. 4:46.” R. 4:6-2. To succeed on a motion for summary judgment, defendant must show that there was no dispute as to any material fact and that it was entitled to judgment as a matter of law. Therefore, the judge would have had to view the evidence in the light most favorable to the plaintiff and decide whether that evidence would be “sufficient to permit a rational factfinder to resolve the alleged disputed issue in favor of [plaintiff]”. Brill v. Guardian Life Ins. Co., 142 N.J. 520, 523, 540, 666 A.2d 146 (1995). If the evidence was sufficient, summary judgment should have been denied.
Here the judge accorded no reasonable inferences of fact. On the contrary, the judge construed the circumstances against plaintiff at every turn during argument of the motion.2
The complaint alleged that the parties made a contract providing “that plaintiff would undertake the representation of the defendant for the purpose of negotiating with the tax assessor of the Borough of Lyndhurst as to the appropriate valuation of [the] properties [leased by defendant] for real estate assessment purposes.” It was also alleged that defendant would pay defendant certain fees if “plaintiff secured a reduction from the City Assessor in the assessed valuation of the property.” Alleging that a tax savings was successfully negotiated, plaintiff demanded a fee of $31,541.
The contract document was provided to the court for consideration on the motion. In addition to providing defendant with *523plaintiffs negotiating expertise, the contract dealt with the possibility of a tax appeal. In that respect, it states:
If it is necessary to file a tax appeal in order to obtain a reduction of the Assessed Value, the services of an attorney and/or appraiser may be required. In the event that such services are required, Client agrees to retain an attorney and/or appraiser and to pay such professionals directly in a timely manner. NRC agrees to deduct the amount of attorney and/or appraisal fees from the final fee amount due NRC. Upon the request of Client, NRC agrees to respond to any requests for information from the taxing jurisdiction and to assist Client’s attorney and/or appraiser.
Raymond Koski, NRC’s president, certified that he “performed real property valuation consulting services” for defendant’s landlord, Charles Klatskin. At Klatskin’s suggestion, Koski wrote to Maurice Dickson, defendant’s chief financial officer, on March 24, 1995. He wrote that there was “a potential to reduce property taxes” since the property was assessed at $65 per square foot, but in his opinion it should be only $50 per square foot “for property tax purposes.” He advised that a reduction to the lower value would yield a potential tax savings of $41,000. He further stated that NRC’s fee for achieving such a result was “50% of the tax savings for each year under appeal.” The letter then explained that defendant would have to be represented by counsel “to file papers to the State Tax Court,” and suggested using Klatskin’s attorney. Koski agreed to deduct the attorney’s fees from “NRC’s final fee.” The letter closed with a reminder that a tax appeal had to be filed by April 3, 1995, just ten days later.
According to Koski, Dickson replied and advised that defendant wished to hire NRC but would prefer to retain an attorney other than its landlord’s attorney. Koski then furnished defendant the name of another attorney, Bart S. Oates. Dickson asked for Oates’ telephone number, asked Koski to contact Oates and provide the data needed to file a tax appeal, and then Dickson contacted Oates directly to arrange for representation. Koski certified that “[a]t no time did [he] arrange unilaterally for Oates to file an appeal of the assessment.” In another certification filed with the trial judge, Oates confirmed this arrangement and noted that he filed a timely tax appeal “on the request of Mr. Dickson” *524and thereafter “had several conversations with Mr. Koski relating to valuation of the property.”
Considering the motion, the judge determined that this meant plaintiff had solicited defendant for obtaining a tax reduction and being compensated on a contingent basis, and that NRC had intended to prepare and file a tax appeal but “[t]hey were going to put somebody else’s name on it.” He continued, “They were going to give ten percent to the attorney to let us use his name.” The judge acknowledged that NRC did not prepare and file any pleadings in any tax appeal, but said “in this case ... that’s what was intended. They would have named an attorney. There’s no doubt in my mind. The attorney was just incidental, to put his name on the filing of some papers.”
The judge based his determination on Opinion No. 25, Comm, on the Unauthorized Practice of Law, 130 N.J.L.J. 115 (1992) and Supplement to Opinion No. 25, 143 N.J.L.J. 542 (1996). There the Committee on the Unauthorized Practice of Law was concerned with “[a]n organization that solicits homeowners to initiate tax appeals and engages an attorney in conjunction with such appeals,” and it held that such an organization “is impermissibly practicing law.” We note that cases from Kentucky, Ohio and Rhode Island were cited in the opinion for the proposition that an organization “engaged in rendering legal service through the employment of qualified lawyers to perform services for others [is committing] the unauthorized practice of law.” Thus, the situation seemingly presented here, viz., the solicitation of a taxpayer by a non-attorney tax consultant followed by the taxpayer choosing and retaining the attorney, was not considered by the Committee when it issued Opinion No. 25. The Supplement to Opinion No. 25 does not clarify the original opinion for our purposes either. Suffice it to say that we do not consider the mere solicitation of a taxpayer for provision of “real property valuation consulting services” is an unauthorized practice of law.
Here the over-arching issue is the construction of the contract that plaintiff claims defendant breached and defendant *525claims is void because it provides for the unauthorized practice of law. Necessarily that involves an examination of the facts of this particular situation, especially the circumstances concerning the retention of the law firm. The trial court should also examine the claim that “it is common practice for an appraiser for a municipality and a taxpayer to directly discuss pending tax appeal litigation and assessments,” as asserted by Jeffrey Hendricks, the appraisal consultant to the Tax Assessor of Lyndhurst, when considering whether the contract concerns the unauthorized practice of law by NEC’s agreement “to take all reasonable measures to obtain a reduction in the Assessed Value in a prompt and timely manner.” In failing to recognize the material factual issues, especially when viewed in the light most favorable to NRC as the non-moving party, the judge erred in granting defendant’s motion. Brill v. Guardian Life Ins. Co., supra, 142 N.J. at 540, 666 A.2d 146.
Reversed and remanded.
See Restatement (Second) of Contracts, § 178; Saxon Constr. & Mgmt. Corp. v. Masterclean of No. Carolina, 273 N J.Super. 231, 641 A.2d 1056 (App.Div.) (“[n]o contract can be sustained if it is inimical to the public interest or detrimental to the public good.... [0]ur courts have declined to enforce contracts that ... interfere with the administration of justice”), certif. denied, 137 N.J. 314, 645 A.2d 142(1994).
There was no written opinion nor any supplemental statement as permitted byR. 2:5-l(b).