
755 P.2d 457 (1988)
ACE TITLE COMPANY, INC., d/b/a Ace Tile & Terrazzo, Inc., Plaintiff-Appellee,
v.
CASSON CONSTRUCTION COMPANY, INC., Defendant-Appellant,
v.
Victor F. BOOG, Appellant, and
Sam W. Miller, August Waegemann; and Union Square Development Company, Defendants-Appellees.
No. 85CA0989.
Colorado Court of Appeals, Div. II.
April 14, 1988.
*458 Ireland, Stapleton, Pryor & Pascoe, P.C., Constance C. Talmage, Jerel L. Ellington, Mark W. Williams, Denver, for plaintiff-appellee.
Bradley, Campbell & Carney, P.C., Victor F. Boog, Golden, for Casson Const. Co., Inc. and Victor F. Boog.
TURSI, Judge.
Casson Construction Company, Inc., (contractor) appeals the trial court's judgment in favor of Ace Tile Company, Inc. (subcontractor), and dismissal of its cross-claim against Union Square Development Company, Sam W. Miller, and August E. Waegemann (owners). It also appeals the judgment of attorney fees in favor of Ace Tile and against Casson and its counsel, jointly and severally. We affirm in part and reverse in part.
Contractor was the general contractor on two office buildings owned by Union Square Development Company. Sam W. Miller and August E. Waegemann were the general partners of Union Square. The cost-plus, owner-contractor agreements provided that the contractor's fee was to be five percent of the cost of the work under the contract documents and eight percent for approved change order work. Subcontractor entered an agreement with contractor to do the tile work on the buildings.
*459 The subcontract provided that contractor would make partial payments to subcontractor of 90 percent of the value of its work as it was accomplished. It further provided that:
"Final payment will be made within thirty (30) days after the work called for hereunder has been completed by the Subcontractor to the satisfaction of the Owner and the Contractor, and the Contractor has received from the Owner written acceptance thereof together with payment in full for this portion of the work."
Pursuant to the subcontract and three change orders for additional work, subcontractor completed work chargeable at $63,564 on one of the buildings. It also completed additional work chargeable at $304 on the second building. It was stipulated that subcontractor fully completed this work to the satisfaction of contractor and owners.
Contractor paid subcontractor only 90 percent of the value of the work and subcontractor brought this action to recover the unpaid 10 percent retainage.
Contractor answered, asserting that the subcontract provided that it was not required to pay subcontractor until owners paid contractor for subcontractor's work. It further asserted it had not been paid for the work for which it had not paid subcontractor. Also, it cross-claimed against owners for the amount of any judgment entered against it.
Owners answered that, pursuant to their contract with contractor, contractor was fully responsible to pay all obligations to subcontractors. They further maintained that they had paid contractor all amounts due and owing pursuant to their contract. They also cross-claimed against contractor for the amount of any judgment entered against them.
Trial was held to the court. It determined, as a matter of fact, that owners had made payment to contractor for the work that was completed by subcontractor. It also determined, as a matter of law, that the above quoted subcontract term was not a condition precedent to contractor's liability to pay; rather, it was a covenant to postpone payment for a reasonable time. Therefore, it entered judgment against contractor for $6,660.40, plus interest. It also entered judgment in favor of owners and against contractor on the cross-claims.
The trial court further determined that contractor's defense in this action was substantially frivolous and groundless. It awarded attorney fees in favor of subcontractor and against contractor and contractor's counsel, jointly and severally.

I
Contractor asserts that the trial court erred in determining it was obligated to pay subcontractor in full since its receipt of payment from owners was a condition precedent to its obligation and it had not been paid in full for subcontractor's work.
We disagree that the trial court erred in its factual determination that contractor had been paid in full for subcontractor's work; therefore, we need not address whether the interpretation of the subcontract term was a condition precedent or a covenant.
This court cannot substitute itself as the finder of fact, and a trial court's factual determinations will not be disturbed on review unless so clearly erroneous as to find no support in the record. Gebhardt v. Gebhardt, 198 Colo. 28, 595 P.2d 1048 (1979); Ault Aerial Applicators, Inc. v. Irvine, 684 P.2d 949 (Colo.App.1984).
Here, contractor concedes that the amount still due on the project is $112,000. The trial court determined, in part, that contractor's five percent fee on the project was about $300,000 and that all of that fee had been paid except for approximately $100,000. It further determined that contractor's agent testified that it had been paid an amount that would pay all of the subcontractors. Therefore, the trial court concluded that contractor had been paid in full for subcontractor's work.
Contractor maintains that its fee was incorporated into its draw requests; therefore, it received its fee in increments along with the increment payments for subcontractor's *460 costs. Accordingly, it contends that the money owners still owe on the project is not allocable in its entirety to its fee.
However, our examination of the draw request figures do not support contractor's position. It argued that draw request number 15 reflected payment to subcontractor under the contract and without the change orders. But subcontractor's line item shows payment by owners of $60,157 which is more than the subcontract amount ($50,887) or the subcontract amount plus contractor's five percent ($55,431.35).
On the other hand, the draw request figures do not support owners' contention that it was payment for the subcontract and change orders. The $60,157 payment is less than the $63,564 total due to subcontractor.
Consequently, determination of the allocation of the payment already made by owners was a question of credibility for the trial court to determine. In a trial to the court, it is within the province of the trial court to determine the credibility of witnesses, weight of the evidence, and the inferences to be drawn therefrom. People in Interest of M.S.H., 656 P.2d 1294 (Colo. 1983); Ault Aerial Applicators, Inc. v. Irvine, supra. Since the evidence on this issue is conflicting, we will not disturb the trial court's findings on review.

II
Contractor argues that the trial court erred by entering judgment against it on its cross-claim against owners. We disagree.
Contractor maintains, and we agree, that the agreement between it and owners required owners to indemnify it for any and all damages which it may sustain on account of any claim by a subcontractor on the buildings. However, the agreement also had an addendum which provided that owners could pursue any claims or offsets against contractor that were paid pursuant to the indemnity agreement.
The trial court concluded that owners had an offset in this case based on owners' cross-claim and the trial court's factual determination that owners had already paid in full for subcontractor's work. We agree with the trial court.
Contractor maintains that even if it was not entitled to judgment against owners pursuant to the indemnity agreement, it was nonetheless entitled to the judgment based on the $112,000 owners admitted they otherwise owed it on the buildings. As support, contractor cites C.R.C.P. 13(g) and C.R.C.P. 18(a) which permit a party to assert any claim against a coparty arising out of the transaction that is the subject matter of the original action or as many claims as it has against an opposing party.
However, contractor did not assert a claim against owners for damages other than the amount due to subcontractor. Therefore, it had no alternative basis here upon which it could recover.

III
Finally, contractor argues that the trial court erred by determining its defense to subcontractor's claim was substantially groundless and frivolous and, therefore, erred in assessing attorney fees against contractor and its counsel pursuant to § 13-17-102, C.R.S. (1987 Repl. Vol. 6A). We agree.
A claim or defense is groundless if the allegations in the pleading, while sufficient to survive a motion to dismiss for failure to state a claim, are not supported by any credible evidence at trial. Western United Realty, Inc. v. Isaacs, 679 P.2d 1063 (Colo.1984). A claim or defense is frivolous if the proponent can present no rational argument based on the evidence or law in support of the claim or defense. Western United Realty, Inc. v. Isaacs, supra.
Here at trial, contractor presented credible evidence to support its factual allegation that it had not been paid in full by owner; therefore, its defense was not groundless.
Further, based upon a division of authority, contractor presented a legal question of first impression in Colorado. That question, *461 addressed by the trial court, was whether the subcontract term should be interpreted as a condition precedent or a covenant for payment in a reasonable time. A claim for attorney fees on a matter in which there is conflicting authority and which is concededly an issue of first impression here, is itself, suspect as frivolous.
Therefore, the trial court erred by assessing attorney fees, and we reverse the award of those fees.
We also deny subcontractor's request for attorney fees on this appeal. Contractor presented a rational, factual argument and sought to come within the exception to the general rule that a trial court's factual findings are not to be disturbed on appeal unless clearly erroneous and not supported by the record. See Mission Denver Co. v. Pierson, 674 P.2d 363 (Colo.1984).
Accordingly, the judgment in favor of subcontractor and owners is affirmed, but the award of attorney fees is reversed.
BABCOCK and PLANK, JJ., concur.
