Exercise 3

Implement Exercise 3 from README.md