updates handling errors (Iteration E2, Ch. 10)