This chapter does not prevent the prime contractor from reasonably withholding payment or a portion of payment to the remote contractor, as long as the withheld payment is in accordance with the written contract between the prime contractor and the remote contractor. The prime contractor may also withhold a reasonable amount of retainage as specified in the written contract between the prime contractor and remote contractor; except, that the retainage amount must not exceed five percent (5%) of the amount of the contract.
T.C.A. § 66-34-303