more error masking; more error tests; more comments