Modified for Exercise 3