residuals method possible fix