Solved exercise number 3