Ex. 5.4 implemented.
Exercise 5 completed.