add scripts for residual plots