Added residuals (unused at the moment)