solved Problem B.