Completing exercises for Chapter 3

this is a nice way of doing it :+1: