add code for udacity cs212 lesson 1