Solved prob 4