finish exercise 3.5.1 3.5.2