Implement Exercise 18