prob 7 solution