Solving problem 8.