Finished chapter 4 of tutorial