Improve problem 2.