Modify exercise 19. Finished chapter 5