substantial performance and damages for breach of contract