exercise 7 solution added