explain the essentials of a valid contract