code for chapter 4

now I need to demo and photograph it