updated exercise 2