Solution for P03 exercise, question 4