Commiting first version of exercise 4 from chapter 2.