changes to residual maps for diagnostics