finish homework for exercise 3