updated exercise 7c