updated exercise 4