both functions compute error() and estimate() work