exercise 5.2 added