added beginning to exercise 17