Ex. 8
solution