solution 2 prob 5