add max residual plot