Solution to problem 10