Added setting for residual type