Implement exercise 2.1.
2.2