Solving problem 7.