prob 40 solved