
317 S.E.2d 508 (1984)
Gary A. DUNLAP, Ernest L. Isenhart, Jr., et al.
v.
Robert E. HINKLE.
No. 15929.
Supreme Court of Appeals of West Virginia.
June 13, 1984.
*509 William C. Garrett, Garrett, Whittier & Garrett, Webster Springs, William C. Thurman, Buckhannon, for appellants.
Thomas H. Keadle, Buckhannon, for appellee.
McHUGH, Chief Justice:
This action is before this Court upon the appeal of Gary A. Dunlap, Ernest L. Isenhart, Jr., Daniel T. Christian and John M. Butcher, the appellants, from an order of the Circuit Court of Upshur County wherein that court dismissed a civil action filed by the appellants against Robert E. Hinkle, the appellee. The appellants had commenced the civil action against the appellee in an effort to enforce a mechanic's lien they had filed against the appellee's real estate. This Court has before it the petition *510 for appeal, all matters of record and the briefs of counsel.
In October, 1981, the appellee leased to Raymond Arington a piece of real estate located in Upshur County, West Virginia, commonly known as the Raina or Dixie Plaza. The lease agreement executed between the parties contained a clause that reads as follows: "Any improvements made to the leased premises shall, upon termination of this lease or the termination of any extension thereof, become the property of the Lessor." Arington hired the appellants to do certain electrical and carpentry work to a building located on the leased premises, however, Arington went out of business shortly thereafter owing the appellants various wages and the costs of materials.
On March 3, 1982, the appellants filed a mechanic's lien against the respective property interests of the appellee and Arington in the leased property. On the same day, the appellants also commenced a civil action against the appellee and Arington in the Circuit Court of Upshur County to enforce the mechanic's lien against the property and praying for various damages. Arington was thereafter adjudicated bankrupt and immune from liability.
In his answer, the appellee moved the trial court to dismiss the action pursuant to Rule 12(b)(6) of the West Virginia Rules of Civil Procedure, alleging, inter alia, that the action should be dismissed because of a lack of contractual privity between the appellants and the appellee with respect to the improvements to the property. In an order entered April 22, 1983, the trial court granted the appellee's motion to dismiss the action based upon this Court's holding in Lilly v. Munsey, 135 W.Va. 247, 63 S.E.2d 519 (1951), and further released the mechanic's lien against the appellee's real estate. In dismissing the action, the trial court held that the appellants' complaint failed to allege that a contract, "express or implied," existed between the appellants and the appellee.[1]
*511 The issue in the case before us revolves around the interpretation of W.Va.Code, 38-2-1 [1931]. That statute provides as follows:
Every person, firm or corporation, which shall erect, build, construct, alter, remove or repair any building or other structure, or other improvement appurtenant to any such building or other structure, under and by virtue of a contract with the owner for such erection, building, construction, alteration, removal or repair, either for an agreed lump sum or upon any other basis of settlement and payment, shall have a lien upon such building or other structure or improvement appurtenant thereto, and upon the interest of the owner thereof in the lot of land whereon the same stands, or to which it may have been removed, to secure the payment of such contract price or other compensation therefor.
Lilly v. Munsey, supra, involved a lease wherein the owners of a certain parcel of real estate leased such real estate to the lessee for the purpose of constructing and operating a race track "and it was provided that the said lessee was authorized to erect all buildings necessary to the operation of the said race track, or for any other lawful purpose, on the land owned by ... [one of the lessors] ... and included in said leased premises." 135 W.Va. at 248, 63 S.E.2d at 520. The lessee hired the plaintiff to construct the racetrack which included grading work. The plaintiff was not paid for the grading work and he filed a mechanic's lien against the property interest of the lessors and sought to enforce it in the circuit court.
This Court reversed the circuit court's judgment in favor of the plaintiff and held in syllabus point 1 as follows:
A mechanic's lien for supplies and labor used and employed in the improvement of real estate, to bind the interest of the owner of such real estate, or any interest therein, must be based on contract for such improvement with such owner, of said real estate or interest therein, or his duly authorized agent.
This Court's holding in Lilly v. Munsey is in accord with the general view that:
In the absence of some special provision creating a lessee as an agent for the lessor, the mere relation of lessor and lessee does not make the lessee the agent of the lessor to contract for work on leased premises, although the interest of the lessee in the land, created by the lease, may be made the subject of a mechanic's lien.
135 W.Va. at 252-53, 63 S.E.2d at 522. See generally 57 C.J.S. Mechanic's Liens §§ 65 & 195 (Supp.1983); Annot., 163 A.L.R. 992 at § IV(b) (Supp.1983); Annot., 79 A.L.R. 962 at § IV(b) (Supp.1983).
Where the terms of a lease simply authorize a lessee to make improvements to the leased premises, although the improvements become the property of the lessor upon termination of the lease, a party with whom the lessee has contracted to make the improvements may not assert a mechanic's lien against the property interest of the lessor in the leased premises. See Hayward Lumber & Investment Co. v. Graham, 104 Ariz. 103, 449 P.2d 31 (1968); Budget Electric Co. v. Strauss, 417 So.2d 1143 (Fla.Dist.Ct.App.1982); Heflin v. W.D.M. Corp., 391 So.2d 357 (Fla.Dist.Ct. App.1980); Indianapolis Raceway Park, Inc. v. Curtiss, 179 Ind.App. 557, 386 N.E.2d 724 (1979); Miles Homes of Indiana, Inc. v. Harrah Plumbing and Heating Service Co., Inc., Ind.App., 408 N.E.2d 597 (1980); Landas Fertilizer Co. v. Hargreaves, 206 N.W.2d 675 (Iowa 1973); Abbeville Lumber Co. v. Richard, 350 So.2d 1292 (La.Ct.App.1977); Messina Brothers Construction Co. v. Williford, 630 S.W.2d 201 (Mo.Ct.App.1982); Met Painting Co., Inc. v. Dana, 90 Misc.2d 289, *512 394 N.Y.S.2d 392 (1977); Kazmier v. Thom, 63 Ohio App.2d 29, 408 N.E.2d 694 (1978); Commercial Fixtures and Furnishings, Inc. v. Adams, 564 P.2d 773 (Utah 1977); McCombs Construction, Inc. v. Barnes, 32 Wash.App. 70, 645 P.2d 1131 (1982). There must be some other evidence that the lessee was acting as the agent of the lessor in making improvements to the leased premises, however, mere acquiescence or inactive consent by the lessor of the leased premises to the improvements by the lessee is not sufficient to constitute a finding of agency between the lessor and lessee for the purpose of asserting a mechanic's lien against the property interest of the lessor. See Miles Homes of Indiana, Inc. v. Harrah Plumbing and Heating Service Co., Inc., Ind.App. 408 N.E.2d at 600; McCombs Construction, Inc. v. Barnes, 32 Wash.App. at 74-75, 645 P.2d at 1134.
Usually, a mechanic's lien will arise against the property interest of the lessor if the improvements made to the property by the lessee are performed pursuant to an express agreement between the lessor and lessee or where the terms of the lease impliedly obligate the lessee to make the improvements. See generally 57 C.J.S. Mechanic's Liens § 65(c) (Supp.1983). However, when such conditions do not exist, as in the case before us, it has been noted that "[i]n determining whether an agency should be implied the courts have often, perhaps of necessity, gone beyond the agreement and into the whole circumstances of the letting in order to find the answer." Utley v. Wear, 333 S.W.2d 787, 793 (Mo.Ct.App.1960). See also Cassaday v. DeJarnette, 251 Iowa 391, 101 N.W.2d 21 (1960).[2]
This Court has held in numerous cases that "[t]he trial court, in appraising the sufficiency of a complaint on a Rule 12(b)(6) motion, should not dismiss the complaint unless it appears beyond doubt that the plaintiff can prove no set of facts in support of his claim which would entitle him to relief." Syl. pt. 3, Chapman v. Kane Transfer Co., Inc., 160 W.Va. 530, 236 S.E.2d 207 (1977), quoting Conley v. Gibson, 355 U.S. 41, 45-46, 78 S.Ct. 99, 102, 2 L.Ed.2d 80, 84 (1957). See Sticklen v. Kittle, W.Va., 287 S.E.2d 148, 156 (1981) (collecting cases).
As this Court further stated in John W. Lodge Distributing Co., Inc. v. Texaco, Inc., W.Va., 245 S.E.2d 157, 158-59 (1978):
The purpose of a motion under Rule 12(b)(6) of the West Virginia Rules of Civil Procedure is to test the formal sufficiency of the complaint. For purposes of the motion to dismiss, the complaint is construed in the light most favorable to plaintiff, and its allegations are to be *513 taken as true. Since common law demurrers have been abolished, pleadings are now liberally construed so as to do substantial justice. W.Va.R.C.P. 8(f). The policy of the rule is thus to decide cases upon their merits, and if the complaint states a claim upon which relief can be granted under any legal theory, a motion under Rule 12(b)(6) must be denied.
"All that the pleader is required to do is to set forth sufficient information to outline the elements of his claim or to permit inferences to be drawn that these elements exist." 245 S.E.2d at 159.
The complaint in the case before us alleges that "Defendants [appellee and Arington] caused plaintiffs to enter upon the hereinabove described premises during the months of October, November and December, 1981, to perform labor and supply materials in and for the remodeling, rewiring, reconstruction and alterations of said premises" and demands judgment therefor. Although the appellants rigidly assert that they should be afforded relief under Farley v. Zapata Coal Corp., supra, and W.Va.Code, 38-2-31 [1939], see supra note 1, the appellants should not be precluded from asserting a mechanic's lien theory under W.Va.Code, 38-2-1 [1931]. Based upon the principles set forth above with respect to Rule 12(b)(6) motions, the complaint is sufficient to allege that a contract, express or implied, existed between the appellants and the appellee which caused the appellants to perform the labor in question. For the sole purpose of asserting a mechanic's lien against the lessor's property interest in the leased premises pursuant to W.Va.Code, 38-2-1 [1931], the appellants should be afforded the opportunity, if they so desire, to present evidence, as contained in the lease and surrounding its execution, that Arington was acting as the agent of the appellee when he contracted with the appellants to perform work on the leased premises.
Based upon all of the above, the order of the Circuit Court of Upshur County dismissing the action below is hereby reversed and this case is remanded to that Court for further proceedings consistent with this opinion.
Reversed and remanded.
NOTES
[1]  The appellants contend that the trial court erred when it relied upon the holding in Lilly v. Munsey, supra, and dismissed the action against the appellee. The appellants assert that the trial court should have followed W.Va.Code, 38-2-31 [1939], and this Court's holding in Farley v. Zapata Coal Corp., W.Va., 281 S.E.2d 238 (1981).

In Farley v. Zapata Coal Corp., employees of M & T Coal Corporation, a general contractor, sought to enforce a mechanic's lien pursuant to W.Va.Code, 38-2-31 [1939], against the property interests of M & T Coal and Zapata Coal Corporation, "the lessee of the coal rights and holder of the strip mining permit...." 281 S.E.2d at 240. W.Va.Code, 38-2-31 [1939], provides, in pertinent part, as follows:
Every workman, laborer or other person who shall do or perform any work or labor, for an incorporated company doing business in this State, by virtue of a contract either directly with such incorporated company or with its general contractor, or with any subcontractor, shall have a lien for the value of such work or labor upon all real estate and personal property of such company....
Zapata Coal had contracted with M & T Coal to conduct the mining operation, however, M & T Coal left the State owing employees various wages and accrued fringe benefits. Twenty-two of these former employees filed mechanic's liens against M & T Coal and Zapata Coal and sought to enforce them in the circuit court. In addition, the employees sought, through the aid of the mechanic's liens, liquidated damages and attorney fees pursuant to the Wage Payment and Collection Act, as amended, W.Va.Code, 21-5-1 to 21-5-16. Zapata Coal did not contest the applicability of the mechanic's liens with respect to the unpaid wages under the above statute. Zapata Coal only challenged the applicability of the mechanic's lien statute to enforce the claims for accrued fringe benefits and the liquidated damages and attorney fees under the Wage Payment and Collection Act. This Court held that the remedy contained in the above mechanic's lien statute encompasses the recovery of "all compensation contracted to be paid by the employer for the employee's services regardless of the nature of such compensation." Syl. pt. 1, Farley v. Zapata Coal Corp., supra. (emphasis in original). In addition, we held that such mechanic's liens may be used to aid in "the enforcement of a lien for liquidated damages" under W.Va.Code, 21-5-4(e) [1975], and that an employee who is successful in enforcing a claim under the Wage Payment and Collection Act "should ordinarily recover costs, including reasonable attorney fees unless special circumstances render such an award unjust." Syl. pts. 2 & 3, Farley v. Zapata Coal Corp., supra.
Farley v. Zapata Coal Corp. and W.Va.Code, 38-2-31 [1939], are inapplicable to the case now before us. Inasmuch as mechanic's liens are wholly statutory remedies, the language of the statute controls. See syl.pt. 3, Woodford v. Glenville State College Housing Corp., 159 W.Va. 442, 225 S.E.2d 671 (1976). W.Va.Code, 38-2-31 [1939], only applies to mechanic's liens for persons who perform labor for "an incorporated company," "its general contractor, or with any subcontractor." The record does not indicate that the appellee is an incorporated company nor does it reveal that Arington was a general contractor or subcontractor when he contracted with the appellants to perform the labor in question.
[2]  Consistent with the general rule is the holding by the Court of Appeals of Ohio in Kazmier v. Thom, supra, wherein that court held in syllabus point 1 as follows:

Where a contractor has an agreement solely with a lessee of real estate to furnish labor and materials for an improvement on the leased premises, a properly filed affidavit for a mechanic's lien creates a lien on the lessee's interest in the real estate only, and the contractor has no right to file a mechanic's lien on the lessor's interest.
(emphasis in original). However, the court in Kazmier further held in syllabus point 2 that "[t]he inability to assert a mechanic's lien against a lessor of real property does not bar the contractor from an action against the lessor to obtain a money judgment on the principles of quasi contract and unjust enrichment." See also Commercial Fixtures and Furnishings, Inc. v. Adams, supra, (Maughan, J., dissenting).
Recovery of damages based upon the theories of quasi contract or unjust enrichment does not necessitate a finding of privity of contract between the parties. See generally Restatement (Second) of Contracts § 4(b) (1981); 17 C.J.S. Contracts § 6 (Supp.1983). "Quasi contractual obligations are imposed by the law for the purpose of bringing about justice without reference to the intention of the parties." 1 W. Jaeger, Williston on Contracts § 3A (3d ed. Supp.1983). As noted in the dissent in Commercial Fixtures and Furnishings, Inc. v. Adams, supra:
"Unjust enrichment of a person occurs when he has and retains money or benefits which in justice and equity belong to another.... The benefit may be an interest in money, land, chattels, or choses in action; beneficial services conferred; satisfaction of a debt or duty owed by him; or anything which adds to his security or advantage."
564 P.2d at 776, quoting Baugh v. Darley, 112 Utah 1, 6, 184 P.2d 335, 337 (1947).
