Solved exercise 19