improve problem 2.5