code from tutorial

code for discussion