Ex. 9
solution