plots and code files 1-4