Initial incomplete version of exercise 3