finish exercise 2.39