Committing first version of exercise 3 in chapter 3.