code from tutorial

code for discussion
Merge pull request #2 from nwatkins27/master

code from tutorial