updated code for exercise 1 to use png(), moved location of figure1.png