added residuals