Homework #5 done through question #2