
793 P.2d 609 (1990)
Evelyn IRWIN, Plaintiff-Appellant and Cross-Appellee,
v.
ELAM CONSTRUCTION, INC., a Colorado corporation, Defendant-Appellee and Cross-Appellant.
No. 88CA1078.
Colorado Court of Appeals, Div. II.
January 18, 1990.
As Modified on Denial of Rehearing March 1, 1990.
Certiorari Denied July 9, 1990.
Harshman & McBee, Donald L. McBee, Grand Junction, for plaintiff-appellant and cross-appellee.
Hugh D. Wise, III, Aspen, for defendant-appellee and cross-appellant.
Opinion by Judge HUME.
Plaintiff, Evelyn Irwin, appeals the summary judgment entered in favor of defendant, Elam Construction, Inc. In that judgment, the court ruled that plaintiff's claim was barred by the two-year statute of limitations pertaining to building contractors. Defendant cross-appeals the award of attorney fees to Evelyn Irwin. We reverse and remand with directions.
Plaintiff and her husband, Jack C. Irwin, own a home located adjacent to F Road in Mesa County. In 1983, pursuant to a contract with the county, defendant contracted for and performed a construction project to improve and widen F Road.
During construction of the road, Jack Irwin discovered that the home's walls, chimney, and basement had cracked. He *610 believed the damage was the result of vibrations caused by defendant's use of heavy equipment on the adjacent roadway, and in December of 1983, he moved out of the home in fear of its imminent collapse.
The Irwins filed this action March 2, 1987, claiming that their property had been damaged as a result of the negligent construction activities of defendant. Defendant moved for summary judgment contending that the Irwins' claim was barred by operation of Colo.Sess.Laws 1979, ch. 144, § 13-80-127 at 631. That statute is now codified, with amendments not pertinent to this case, in § 13-80-104, C.R.S. (1987 Repl.Vol. 6A).
The trial court initially granted summary judgment only as to Jack Irwin, and denied the motion as to Evelyn. It also determined defendant's motion to be frivolous and groundless as to Evelyn since defendant did not show any law or facts that would allow Jack's knowledge to be imputed to her, and consequently, it awarded attorney fees incurred by Evelyn in resisting the motion.
Subsequently, however, the court granted defendant's second motion for summary judgment which was supplemented by Evelyn's deposition, determining that her right to recover was also barred by the contractor's statute of limitations. This appeal followed.

I.
Relying on certain language appearing in Stanske v. Wazee Electric Co., 722 P.2d 402 (Colo.1986), defendant contends that § 13-80-127 applies to all claims arising from activities of contractors engaged in making improvements to real property. We disagree.
Section 13-80-127 provides, in pertinent part, that:
"(1)(a) All actions against any ... contractor... performing or furnishing the design, planning, supervision, inspection, construction, or observation of construction of any improvement to real property shall be brought within two years after the claim for relief arises, and not thereafter....
(b) A claim for relief arises under this section at the time the damaged party discovers, or in the exercise of reasonable diligence should have discovered the defect in the improvement which ultimately causes injury, when such defect is of a substantial or significant nature.
(c) Such actions shall include any and all actions in tort, contract, indemnity, or contribution or other actions for the recovery of damages for:
(I) Any deficiency in the design, planning, supervision, inspection, construction, or observation of construction of any improvement to real property...." (emphasis supplied)
Here, the Irwins' complaint alleged injury resulting from the defendant's negligent construction activities, rather than upon any claimed defect in the improvement (the roadway). However, in determining whether § 13-80-127 applied to bar the Irwins' claim, the trial court as well as the parties focused on whether factual issues existed concerning when the Irwins' claim for relief arose and whether defendant's activities were directed toward creating an "improvement to real property" within the meaning of § 13-80-127(1)(a). And, the court's resolution of these issues resulted in its entry of summary judgment for defendant.
Likewise, on appeal, the parties did not address whether § 13-80-127 operates only to bar claims for injuries allegedly caused by a defect in the improvement constructed by the defendant, or whether it also operates to bar claims for injuries allegedly caused by negligent acts occurring during construction which did not result in a defect in the improvement itself.
Because we concluded that resolution of the threshold questions as to the scope of the statute's applicability is crucial to a proper construction of the statute as well as the determination of this appeal, we ordered that the parties submit supplemental briefs directed to those questions, and we have now received and considered those materials. See Graham v. Swift, 123 Colo. 309, 228 P.2d 969 (1951).
*611 The meaning of a statute must be determined by examining the language used and the legislative purpose underlying its enactment. Johnston v. City Council, 177 Colo. 223, 493 P.2d 651 (1972). Words and phrases used in a statute must be accorded their familiar and generally accepted meaning. Humana, Inc. v. Board of Adjustment, 189 Colo. 79, 537 P.2d 741 (1975). The statute must be read and considered as a whole, in an attempt to give effect to every word contained therein. Blue River Defense Committee v. Town of Silverthorne, 33 Colo.App. 10, 516 P.2d 452 (1973).
Here, in addressing its scope, the statute in question contains repeated references to "a defect in the improvement" or "deficiency... of ... improvement to real property."
Webster's Third New International Dictionary at 591 defines "defect" as "an irregularity in the surface or a structure that spoils the appearance or causes weakness or failure; [a] fault; [a] flaw; [or a] want or absence of something necessary for completeness, perfection, or adequacy in form or function." See also Black's Law Dictionary at 376 (rev. 5th ed. 1979).
Thus, we conclude that the statute in question, as it applies to the issues here, was intended to apply only to negligence in planning, design, construction, supervision, or inspection that results in a defect in an improvement to real property that, in turn, causes injury to a claimant. It was intended to limit actions against building professionals only for claims of injury arising from defects in the improvement they create, rather than to supplant the applicability of the general limitation statute for all injuries caused by their negligent conduct. And, contrary to defendant's assertion, Stanske v. Wazee Electric Co., supra, does not hold otherwise.
Hence, we conclude that the court erred as a matter of law in granting summary judgment in favor of defendant under the circumstances presented here.

II.
Defendant cross-appeals the court's sua sponte award of attorney fees in favor of Evelyn Irwin, contending that the court erred in imposing such a sanction without affording it prior notice and an opportunity to be heard. We agree.
Section 13-17-103(1), C.R.S. (1987 Repl. Vol. 6A) requires that the court consider specified factors in determining whether to award attorney fees as a sanction. A proper determination of the issue requires a hearing in order to afford the parties an opportunity to address those statutory factors and to enable the court to make informed findings prior to entry of an award. Pedlow v. Stamp, 776 P.2d 382 (Colo.1989).
The summary judgment as to Evelyn Irwin and the award of attorney fees are reversed, and the cause is remanded for trial on Evelyn's claim and for a hearing on the issues of the propriety and amount, if any, of attorney fees to be awarded as a sanction for defendant's filing and pursuit of the initial summary judgment motion as to Evelyn. The summary judgment against Jack C. Irwin, having not been appealed, is unaffected by this opinion.
SMITH and PLANK, JJ., concur.
