updated exercise 3