Code for Lesson 8 CS193p