solution 3 prob 6