Performance by a prime contractor in accordance with a written contract with an owner for improvement of real property entitles the prime contractor to payment from the owner.