First 3 parts of exercise 3 completed. Minor changes to ex2