finish exercise 4.2 in section 4.1.2