Improve the exercise 9