add interactive version of exercise 4