Exercise 7. Added code for  7.6