Solution to problem 15