Solution for P03 exercise, question 3