added exercise 7c