Ex. 3
solution