Exercise 5 solutions