updated code to reflect example code given on Week 3 lesson.