copy code to start problem 5
 finish problem 5 and 6 of homework 3
 add a figure for question 4 of homework 3